[vtkusers] Installing VTK 5.0 on Mac OSX 10.4.6

Mike Jackson imikejackson at gmail.com
Thu May 11 17:03:42 EDT 2006


On 5/11/06, Siddartha Krishnan <sidd.krish at gmail.com> wrote:
> Hi again,
> Thanks for your prompt replies. I corrected the alias line to alias
> vtk='${VTKBUILD}/bin/vtk'
>
> However, the headers still cannot be found:
> main.cpp:3:29: error: vtkSphereSource.h: No such file or directory
> main.cpp:4:31: error: vtkPolyDataMapper.h: No such file or directory
> main.cpp:5:22: error: vtkActor.h: No such file or directory
> main.cpp:6:29: error: vtkRenderWindow.h: No such file or directory
> main.cpp:7:25: error: vtkRenderer.h: No such file or directory
> main.cpp:8:39: error: vtkRenderWindowInteractor.h: No such file or
> directory
>
> I tried both using the command line and XCode (after changing the
> Header Search Paths), but still get these messages.
> Are there any other suggestions to solve this problem?
>
> Thanks.
>
>
>
> On 11-May-06, at 4:06 PM, Mike Jackson wrote:
>
> > On 5/11/06, Siddartha Krishnan <sidd.krish at gmail.com> wrote:
> >> Hi,
> >>
> >> I relatively new to Mac OSX and am having trouble setting up VTK 5.0
> >> on OSX 10.4.6. I used cmake to build vtk and it did so without any
> >> errors, but cannot seem to run the sample code on the vtk.org site.
> >> I get the following errors:
> >>  <snip>
> >> export VTKBUILD=/Develop/VTKBuild
> >> export VTKSOURCE=/Develop/VTK
> >> export TCLLIBPATH=${VTKSOURCE}/Wrapping/Tcl:
> >> export PYTHONPATH=${VTKSOURCE}/Wrapping/Python:${VTKBUILD}
> >> export DYLD_LIBRARYN32_PATH=${VTKBUILD}
> >> alias vtk ${VTKBUILD}/bin/vtk
> >>
> >> but whenever I try to source .profile, the following errors occur:
> >> -bash: alias: vtk: not found
> >> -bash: alias: /Develop/VTKBuild/bin/vtk: not found
> >>
> >> These files do exist.
> >>
> >> I would appreciate any help I can get.
> >> Thanks in Advance,
> >>
> >> Sidd
> >>
> >
> > I also run bash as my shell but I make an alias like the following:
> >
> > alias vtk='${VTKBUILD}/bin/vtk'
> >
> > Are you trying to compile from the command line or in Xcode? If you
> > are in Xcode you will probably have to set the Header Search Paths to
> > find the VTK Headers.
> >
> > If you do a "make install" for VTK, I think that is where it will dump
> > all the headers in /usr/local/include/vtk-5.0
> >
> > If you want to contiue to use cmake from the command line it does work
> > pretty good on OS X, assuming you do NOT need to build for multiple
> > Architectures.
> > --
> > Mike Jackson
> > imikejackson _at_ gee-mail dot com
>

Well,
     I no expert on compiling from the command line. I know there is
the -I flag that should point to the vtk Headers. If you are
referencing the headers in the /Develop/VTK location, note that the
headers are broken into several different directories ( Common.
Filtering, Graphics....) so you will need an include path for EACH
directory that you are using headers from. So for example,
vtkSphereSource is in Graphics and vtkPolyDataMapper is in Rendering.
   The same idea goes for Xcode. In Xcode disclose the "Targets" group
to show all your targets. Double Click on the target you are trying to
build. Then click on the "Build" tab. Now look down the list for the
"User Header Search Path". Edit the value next to the setting using a
SPACE delimited set of paths that point to the include directories.

The easiest way to set this up is to do a "make install". I _think_
(some one correct me here) that will just make a single directory down
in /usr/local/include named "vtk-5.0" and put ALL the headers in
there. That way you only need to spell out ONE include directory for
ALL the VTK headers.

Also, if you are having troubles with Xcode itself, then I might suggest trying:

http://www.lists.apple.com/mailman/listinfo/xcode-users

Hope that helps.
-- 
Mike Jackson
imikejackson _at_ gee-mail dot com



More information about the vtkusers mailing list