[vtkusers] create a VTK project under Xcode on Mac Os X

Sean McBride sean at rogue-research.com
Fri Mar 9 18:04:10 EST 2007


On 3/9/07 11:41 PM, Francesco Pasqualini said:

>this is my step by step procedure:
>
>Start from the folder
>
>/Kitware
>
>where I create /VTKsrc and /VTKbin folders.
>
>in VTKsrc I put the file I downloaded from the site.
>
>then I go in /Kitware/VTKbin and type
>
>cmake /Kitware/VTK
>
>then
>
>ccmake .
>
>and finally  a couple of instruction
>
>make
>sudo make install

So if I understand you correctly, you have successfully built VTK,
correct?  Where did it install to?  /usr/local/ or in your "Kitware"
folder somewhere?  Somewhere, you should have something like:

/myfolder/include/
                 /vtk-5.1/
                          vtkActor.h
                          etc.
         /lib/
              libvtkRendering.a
              etc.

>now, If I want to build some new project, named NEW, ubicate in the  
>folder /Kitware/project, I've to go to /Kitware/project/NEW and write  
>down cmake -G Xcode /Kitware/VTK.
>this create a blank project where I can, FINALLY, put my code and be  
>happy?!

If I understand right, you want to create a new Xcode project and write
new code that uses VTK, right?  If so, I suggest looking at the
SimpleCocoaVTK example (<http://www.rogue-research.com/vtk/
SimpleCocoaVTK.html>) and setting up 2 source trees the same way it
does.  Then create a new C++ project in Xcode.  Next, add all the VTK
static libraries (.a files) to your new Xcode project and reference them
relative to the source tree.  Next, just edit main.cpp and add your VTK-
related code.

Do you know Xcode well, or are you new to it also?

Do you know Cocoa?  Are you using it?

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtkusers mailing list