[Dcmlib] -lgdcm

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Jul 25 19:34:51 CEST 2005


Here is a 'dummy' project:

$ more CMakeLists.txt dummy.cxx 

::::::::::::::
CMakeLists.txt
::::::::::::::
FIND_PACKAGE(GDCM REQUIRED)

# Import all settings
INCLUDE(${GDCM_USE_FILE})

IF(GDCM_FOUND)
   ADD_EXECUTABLE(dummy dummy.cxx)
   TARGET_LINK_LIBRARIES(dummy gdcm)
ENDIF(GDCM_FOUND)
::::::::::::::
dummy.cxx
::::::::::::::
#include "gdcmFile.h"

int main()
{
   gdcm::File f;
   return 0;
}


Those two files are in /tmp/dummy
I then create a directory:
$ mkdir /tmp/dummy-gcc
$ cd /tmp/dummy-gcc
$ ccmake ../dummy
-> I define GDCM_DIR to point to(*) 
/home/mathieu/Dashboards/MyTests/gdcm-bin
$ make

that's all folks... difficult to make is more simple :-P

Mathieu
(*) this path is the path where GDCMConfig.cmake can be found if the 
path does not contain a file GDCMConfig.cmake then I am not responsible 
if your computer burst into fire.



olivier.stern at swing.be wrote:
> LD_LIBRARY_PATH must contain the path to libgdcm.so, no ?
> 
> [olivier at Olivier Recalage]$ ls /usr/local/lib/gdcm/
> libgdcmjpeg12.so* libgdcmjpeg16.so* libgdcmjpeg8.so* libgdcm.so*
> 
> Thx Olivier
> 
> PS: but I m really asking questions to myself. Normaly, when anyone 
> wants to use gdcm, he installs cmake on his computer, then follow the 
> installation rules indicated on the web site and then he is totally able 
> to use gdcm, no ? Why doesn't it work like this for me ? :D
> PS2: I ve just installed the mandriva community version (hope tomorrow I 
> ll have the power pack) with gcc 343, but I have all the sames troubles 
> as with mandrake 10.1 powerpack: must set GDCM_DIR, than add gdcm/file.h 
> to get the correct path to my gdcm h files and then I m getting the 
> error bellow.
> 
> ----------------------------------------
> What is the output of:
> 
> ls /usr/local/lib/gdcm/
> 
> Thanks
> Mathieu
> 
> 
> olivier.stern at swing.be wrote:
>  > Hello,
>  >
>  > sorry ! to come back on this subject, but I can't solve the problem. 
> I've
>  > made:
>  >
>  > LD_LIBRARY_PATH=/usr/local/lib/gdcm/
>  > export LD_LIBRARY_PATH
>  >
>  > But the result is the same:
>  >
>  > /usr/bin/ld: cannot find -lgdcm
>  >
>  > Thanks a lot, Olivier
>  >
>  > ________________
>  >
>  > Hi,
>  >
>  > Your problem is the same you got with you gdcm.h not found : the gdcm
>  > library (libgdcm.so) is not in your library include path (eithier
>  > $LD_LIBRARY_PATH or included inline in the link line :
>  > -Lwherever_your_library_is -lgdcm instead of -lgdcm)
>  >
>  > /usr/bin/ld: cannot find -lgdcm ---> the linker can't find the gdcm
>  > library
>  >
>  > Yours,
>  > Emmanuel
>  >
>  >
>  > ------------------------------------------------------------------------
>  >
>  > _______________________________________________
>  > Dcmlib mailing list
>  > Dcmlib at creatis.insa-lyon.fr
>  > http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
> 
> 
> 




More information about the Dcmlib mailing list