[vtkusers] How to compile tutorial example?
Obada Mahdi
omahdi at gmx.de
Fri Feb 10 15:14:01 EST 2006
Hi James,
here is another hint which might be worth trying.
On Feb 9, 2006, at 11:36 PM, James Frye wrote:
> Since there is no Makefile, I made a simple one, which I've
included at
> the end. The problem is that this gives me about 54K lines of
"undefined
> reference to vtkSomething..." messages. [...]
[Makefile]
> LIBS = -L/opt/vtk/lib \
> -lvtkCommon -lvtkDICOMParser -lvtkFiltering -
lvtkGenericFiltering \
> -lvtkGraphics -lvtkHybrid -lvtkIO -lvtkImaging -
lvtkMPEG2Encode \
> -lvtkNetCDF -lvtkRendering -lvtkVolumeRendering -
lvtkWidgets \
> -lvtkexoIIc -lvtkexpat -lvtkfreetype -lvtkftgl -lvtkjpeg -
lvtkpng \
> -lvtksys -lvtktiff -lvtkzlib
In your Makefile, libraries are mentioned based on lexicographical
order. From what I know about the linking process, the order is
significant; undefined symbols are looked up in the libraries in the
order they are mentioned in the argument list, but (yet unused) symbols
exported by a library are not remembered for later lookup.
You can check library dependencies by having a look at the file
"VTKLibraryDepends.cmake", which in your installation should reside
somewhere in "/opt/vtk/lib/vtk-5.0". In case this is the cause of your
"undefined symbols" problem, rearranging the libraries in the argument
list (so that every library is mentioned _before_ its dependencies)
should help.
Regards
Obada
More information about the vtkusers
mailing list