1

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

/usr/include/gdcm-2.0 /usr/lib/gdcm-2.0*

and a lot of *.so related to gdcm in /usr/lib/

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:

#include <gdcmImageReader.h>
...
gdcm::ImageReader ir;

I get:

error: undefined reference to `gdcm::ImageReader::ImageReader()'

I've tried with:

#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

INCLUDEPATH    += /usr/include/gdcm-2.0
LIBS           += -L/usr/lib/

What could I try? Thanks.

Mat
  • 202,337
  • 40
  • 393
  • 406
Mark A.
  • 193
  • 1
  • 3
  • 14

1 Answers1

1

in your .pro file you should write something like :

LIBS += -lgdcm-2.0   

the main part is LIBS += -l then depends on library you are using..

andrea.marangoni
  • 1,499
  • 8
  • 22