Antw: [vtkusers] 'Undefined Reference' while compiling?
Gregory Bleiker
gregory.bleiker at phonak.ch
Thu Aug 29 02:58:31 EDT 2002
Hi Bert and all
This is a rather annoying situation and there has been a few posts earlier on revering to similar problems. Maybe a tutorial can be found somewhere? Anyway, compiling and (especially) linking the VTK stuff is not as simple as it looks. In your case, you include the vtkCommon library first and that's why you will get the link errors. Including the libs in the following way will probably help:
-lvtkIO -lvtkRendering -lvtkGraphics -IvtkImaging -lvtkjpeg -lvtkpng -lvtkzlib -lvtkFiltering -lvtkCommon -lopengl32
BUT: It is probably the best idea to use CMake to generate the makefile for you (see page 31 of VTK User's Guide). This approach is good, but gets you into a bit of trouble if you want to use the GNU autoconf/libtool approach as you will have to if you want to use FOX, for example. If anybody can tell me how to get past that rock I would highly appreciate it.
Hope this helps
Gregi
More information about the vtkusers
mailing list