[vtkusers] static libs...

fred fredmfp at gmail.com
Wed Oct 18 13:14:55 EDT 2006


Obada Mahdi a écrit :

> Unlike shared libraries, static libraries do not carry dependency
> information, so every required library needs to be stated explicitly
> (in order, which means that a library is to be given on the command
> line after the one that depends on it).  You can obtain dependency
> information from
> "<PREFIX>/lib/vtk-<VERSION>/VTKLibraryDepends.cmake",

Ok. I cut useless info:

SET(vtkCommon_LIB_DEPENDS "vtksys;-lpthread;dl;-lm;")
SET(vtkFiltering_LIB_DEPENDS "vtkCommon;")
SET(vtkImaging_LIB_DEPENDS "vtkFiltering;")
SET(vtkGraphics_LIB_DEPENDS "vtkFiltering;")
SET(vtkGenericFiltering_LIB_DEPENDS "vtkFiltering;vtkGraphics;")
SET(vtkIO_LIB_DEPENDS
"vtkFiltering;vtkDICOMParser;vtkpng;vtkzlib;vtkjpeg;vtktiff;vtkexpat;vtkMPEG2Encode;")
SET(vtksys_LIB_DEPENDS "")
SET(vtkDICOMParser_LIB_DEPENDS "")
SET(vtkMPEG2Encode_LIB_DEPENDS "")

So I tried:
gcc -Wall vtktest.c -o vtktest -static -lvtksys -lvtkDICOMParser
-lvtkMPEG2Encode -lpthread -ldl -lm -lvtkCommon -lvtkFiltering -lvtkpng
-lvtkzlib -lvtkjpeg -lvtktiff -lvtkexpat -lvtkIO

but I get a lot of error messages too.

What's wrong ?

Cheers,

-- 
http://scipy.org/FredericPetit




More information about the vtkusers mailing list