[vtkusers] How to compile tutorial example?
X Z
xf10036 at hotmail.com
Fri Feb 10 14:34:48 EST 2006
James,
I realized that you did placed '-L' and '-I' options and they seemed to be
consistent. So your Makefile should work. I would try linking only to
vtkCommon, vtkGraphics, vtkFiltering, and vtkRendering and see if it works.
Also make sure the same version of compiler is used for installation.
Xiaofeng Zhao
www.xzing.orgh
>From: James Frye <frye at cs.unr.edu>
>To: David Cole <david.cole at kitware.com>
>CC: vtkusers at vtk.org
>Subject: Re: [vtkusers] How to compile tutorial example?
>Date: Fri, 10 Feb 2006 10:16:10 -0800 (PST)
>
>David,
>
>Well, it does and it doesn't :-)
>
>After some fumbling, I got it to generate a Makefile that will compile the
>example. The problems are that it's not a standard makefile at all: it
>calls CMake internally through several levels of scripts and/or recursive
>make calls, creates a bunch of additional directories & files, uses wrong
>commands & extensions...
>
>I suppose I could eventually trace through all of this, and extract the
>relevant parts to make a useable makefile (My first quick shot did get me
>down to a mere 10K or so error lines :-)), but I need to ask whether it's
>going to be worth doing, whether that makefile would work as a template
>for other programs. Please understand that we're not starting a project
>from scratch: we have existing code & makefiles which work. We really
>aren't interested in re-writing all this working code just to integrate
>one toolkit, no matter how nice it is.
>
>So I guess the question now is whether it is feasible to use VTK without
>CMake, and if so, where to start.
>
>Thanks,
>James
>
>
>On Fri, 10 Feb 2006, David Cole wrote:
>
> > If you successfully compiled and installed VTK 5.0, you must have used
> > CMake to do so...
> >
> > Use CMake to generate a makefile for you... If you point CMake at
> > Examples/Tutorial/Step1/Cxx as the source directory you should be able
> > to get a makefile that will build step 1 linking to the VTK you just
>built.
> >
> > HTH,
> > David
> >
> > 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
> > >
> > >
> > >
> >
>
>_______________________________________________
>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