I apologize in advance if I posted in a wrong place (I still hope not).
For reasons not depending on my will, I have to use dcmtk-3.6.0 in a 32 bit WindowsXP environment with MSYS-1.0.11 and mingw (latest stable version, 2013072200 or so). The good news is I won't have to replicate the work on other machines (so one has not to care too much about portability). The bad news is that I constantly get a nasty error when linking against the unavoidable dcmdata library.
The compilation line I use is:
Code: Select all
g++ project.cxx -DHAVE_CONFIG_H -Wno-deprecated -L/usr/local/lib -mwindows -lfltk -lole32 -luuid -lcomctl32 -static -I/usr/local/include -I/include -L/usr/local/lib -o project -llog4cplus -lz -lws2_32 -lwsock32 -lnetapi32 -lofstd -loflog -ldcmdata -ldcmimgle -lpthread -lm
I added "-llog4cplus" after compiling and installing on the system the package log4cplus-1.0.4.3, since it was referenced by compiler messages, but at the end I still get the same sad information:
Code: Select all
C:/msys/1.0/local/lib\libdcmdata.a(dcfilefo.o):dcfilefo.cc:(.text+0x9bd): undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
C:/msys/1.0/local/lib\libdcmdata.a(dcfilefo.o):dcfilefo.cc:(.text+0x9d1): undefined reference to `log4cplus::Logger::~Logger()'
C:/msys/1.0/local/lib\libdcmdata.a(dcfilefo.o):dcfilefo.cc:(.text+0xd3b): undefined reference to `log4cplus::Logger::forcedLog(int, OFString const &, char const*, int, char const*) const'
[...] (similar messages repeat a bunch of times)
C:/msys/1.0/local/lib\libdcmdata.a(dcfilefo.o):dcfilefo.cc:(.text+0x731f): more undefined references to `log4cplus::Logger::~Logger()' follow
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:/msys/1.0/local/lib\libdcmdata.a(dcfilefo.o): bad reloc address 0x8 in section `.text$_ZN9DcmObject5setVRE6DcmEVR[__ZN9DcmObject5setVRE6DcmEVR]'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Thank you for your feedback.