[Dcmlib] Mingw + dcgm ver0.6: Solution

Michal Kurgan linux_user at o2.pl
Tue Feb 1 15:37:55 CET 2005


On Tuesday 01 of February 2005 00:22, you wrote:
> # It become tricky when you do cross compile...
> #IF (WIN32)
>    IF (BUILD_SHARED_LIBS)
>      ADD_DEFINITIONS(-DJPEGDLL)
>    ELSE (BUILD_SHARED_LIBS)
>      ADD_DEFINITIONS(-DJPEGSTATIC)
>    ENDIF (BUILD_SHARED_LIBS)
> #ENDIF (WIN32)

for me it should be ( no spaces ) :
# It become tricky when you do cross compile...
#IF (WIN32)
IF (BUILD_SHARED_LIBS)
  ADD_DEFINITIONS(-DJPEGDLL)
ELSE (BUILD_SHARED_LIBS)
  ADD_DEFINITIONS(-DJPEGSTATIC)
ENDIF (BUILD_SHARED_LIBS)
#ENDIF (WIN32)

if there were spaces i've got errors during make configure.

It works... i build library on xmingw but... ( i separated each line )
there was error in examples ( work with gcc ) :

make[3]: Entering directory `/home/mkurgan/compile/gdcmBin/Example'
Building object file BuildUpDicomDir.o...

/opt/xmingw/bin/i386-mingw32msvc-g++ -o BuildUpDicomDir.o   
-I/home/mkurgan/compile/gdcm/src/ -I/home/mkurgan/compile/gdcmBin/    
-c /home/mkurgan/compile/gdcm/Example/BuildUpDicomDir.cxx

Building executable /home/mkurgan/compile/gdcmBin/bin/BuildUpDicomDir...

/opt/xmingw/bin/i386-mingw32msvc-g++      -fPIC  BuildUpDicomDir.o    
-o /home/mkurgan/compile/gdcmBin/bin/BuildUpDicomDir -rdynamic 
-L/home/mkurgan/compile/gdcmBin/bin -lgdcm -lgdcmjpeg8 -lgdcmjpeg12 
-lgdcmjpeg16 -Wl,-rpath,/home/mkurgan/compile/gdcmBin/bin

i386-mingw32msvc-g++: unrecognized option `-rdynamic'

/home/mkurgan/compile/gdcmBin/bin/libgdcm.a(gdcmDocument.o)
(.text+0xa3c8):gdcmDocument.cxx: undefined reference to `ntohs at 4'

second, mingw can't use so dynamic files, i don't know why... maybe must be 
some other switch ( in my installation there where only static libraries, and 
my qt compiled to dll ), static compilation was successful, when i use them i 
report if everything goes smooth.

Thanks for advices and your time...
-- 
Michal Kurgan



More information about the Dcmlib mailing list