Qt Creator + gdcm (Grassroots DICOM): can't link libraries?
I'm using Qt Creator 2.4.1 under Xubuntu 11.10.
I've installed libgdcm2-dev (2.0.17) in repositories.
Now I have
Quote:
/usr/include/gdcm-2.0
/usr/lib/gdcm-2.0
and a lot of *.so related to gdcm in Writing code, I can autocomplete sentences with gdcm classes and functions (the IDE finds them), but compiling, it gives me error messages like:
My code:
Code:
#include <gdcmImageReader.h>
...
gdcm::ImageReader ir;
I get:
Quote:
error: undefined reference to `gdcm::ImageReader::ImageReader()'
I've tried with:
Code:
#include "/usr/include/gdcm-2.0/ImageImageReader.h"
With this one, it works from a simple editor like Geany.
In my .pro file I have
Code:
INCLUDEPATH += /usr/include/gdcm-2.0
LIBS += -L/usr/lib/
What could I try? Thanks.
Re: Qt Creator + gdcm (Grassroots DICOM): can't link libraries?
Re: Qt Creator + gdcm (Grassroots DICOM): can't link libraries?
Quote:
:-1: error: cannot find -lgdcm
That's what I get with the line
LIBS += -lgdcm
I had it commented. So I guess I've already tried before. I really don't know what to do.
It works with a simple editor, so I suppose it is a problem with Qt Creator, in the .pro file.
Re: Qt Creator + gdcm (Grassroots DICOM): can't link libraries?
What does the following return?
ls /usr/lib/lib*gdcm*.so
Re: Qt Creator + gdcm (Grassroots DICOM): can't link libraries?
/usr/lib/libgdcmcharls.so /usr/lib/libgdcmjpeg12.so
/usr/lib/libgdcmCommon.so /usr/lib/libgdcmjpeg16.so
/usr/lib/libgdcmDICT.so /usr/lib/libgdcmjpeg8.so
/usr/lib/libgdcmDSED.so /usr/lib/libgdcmMSFF.so
/usr/lib/libgdcmIOD.so /usr/lib/libgdcmopenjpeg.so
You gave me the idea of adding
Quote:
LIBS += -lgdcmcharls -lgdcmjpeg12 -lgdcmCommon -lgdcmjpeg16 -lgdcmDICT -lgdcmjpeg8 -lgdcmDSED -lgdcmMSFF -lgdcmIOD -lgdcmopenjpeg
and it worked!
Thank you very much.
Re: Qt Creator + gdcm (Grassroots DICOM): can't link libraries?
Does the following return anything?
pkg-config --list-all|grep gdcm
If so, better use pkgconfig support built into qmake to set the libraries.
Re: Qt Creator + gdcm (Grassroots DICOM): can't link libraries?
Quote:
pkg-config --list-all|grep gdcm
doesn't return anything.