Compiling on Ubuntu

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
psih128
Posts: 17
Joined: Wed, 2009-08-26, 02:10

Compiling on Ubuntu

#1 Post by psih128 »

I was trying to compile the project I'm working on under Ubuntu 10.04:

$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

DCMTK compiles links and installs ok, but the project that links to DCMTK fails to link. There is a huge number of link errors, mostly related to log4cplus. Some of the errors are here:
http://pastebin.com/68zqsBDu

Is there a quick fix for this issue?

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

DCMTK compiles links and installs ok, but the project that links to DCMTK fails to link.
So, did you simply forget to adapt your project's makefiles? Of course, you also need to link the new "oflog" library to your project ...

psih128
Posts: 17
Joined: Wed, 2009-08-26, 02:10

#3 Post by psih128 »

No, the same configuration compiles fine on Mac:
-L/usr/local/dcmtk/lib/ -lofstd -loflog -ldcmimage -ldcmdata -ldcmjpeg -lijg8 -lijg12 -lijg16 -ldcmimgle

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#4 Post by Jörg Riesmeier »

The link order is usually significant: dcmjpeg ijg8 ijg12 ijg16 dcmimage dcmimgle dcmdata oflog ofstd

psih128
Posts: 17
Joined: Wed, 2009-08-26, 02:10

#5 Post by psih128 »

Yep, this is it - thanks a lot!
I'm wondering why it was not an issue on mac...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest