[vtkusers] How to compile tutorial example?

Anka Kochanowska anka at bic.mni.mcgill.ca
Fri Feb 10 08:49:59 EST 2006


Hi!
You should have CMakelist.txt in every example directory. Then you just 
run cmake or ccmake to make Makefile.
A


James Frye wrote:

>Hi,
>
>I've just downloaded and installed VTK 5.0.  I compiled and installed it
>in /opt/vtk.  Now I'm trying to get the first example in
>Examples/Tutorial/Step1 to run.  
>
>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.  Obviously. something fundamental
>is wrong, but what?  How do I get a Makefile that I can use to compile a
>simple example?
>
>Thanks,
>James
>
>PS: I did read the install instructions, all the FAQs, and tried to search
>the mailing list archives (using "how to compile example" as a search
>string).
>
>
>The Makefile:
>
>NAME = Cone
>
>CC   = /usr/bin/gcc
>CPP  = /usr/bin/gcc
>
>CFLAGS += -g -Wunused -Wno-deprecated -I/opt/vtk/include/vtk-5.0
>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
>
>
>$Cone: Cone.o
>	$(CC) -o $@ $^ $(LIBS)
>
>
>.cpp.o:
>	  $(CPP) $(CFLAGS) -c $< 
>
>
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>  
>



More information about the vtkusers mailing list