Does this file actually exist?<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80); ">/Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkHybrid.dylib</span></div>
<div><font class="Apple-style-span" color="#500050" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" color="#500050" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">The question is, how did you get a VTK library inside your python framework? That is completely unexpected. (As is a 6.1 version of python... as far as I know, version 6.1 of python is still far in the future...)<br>
</span></font><br></div><div><br><div class="gmail_quote">On Wed, Aug 11, 2010 at 12:53 AM, Nicholas Kinar <span dir="ltr">&lt;<a href="mailto:n.kinar@usask.ca">n.kinar@usask.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
I had originally posted this question to the vtkusers mailing list.  However, after receiving feedback from other VTK users it is also apparent that there is a possibility my question belongs on the cmake mailing list.<div class="im">
<br>
<br>
I&#39;m writing a program for a research application, and I would like to use Cmake as the makefile generation tool.  Here is the basic information pertaining to my development platform:<br>
<br></div>
cmake version 2.8.2 (binary version from website)<div class="im"><br>
i686-apple-darwin10-gcc-4.2.1<br></div>
llvm version 2.6svn,  Apple Build #2207-05<div class="im"><br>
Snow Leopard 10.6.4 on an x86_64 Macbook Pro<br>
vtk-5.6.0 (stable version)<br>
<br></div>
The VTK libraries have been installed into the /usr/local directory.  I&#39;ve tried the most recent release version of CMake pulled from git and the binary (pre-packaged) version on the Kitware website.  Both generate makefiles with the same error on Mac OS X.<br>

<br>
I&#39;ve written a CMakeLists.txt file to generate the makefile.  This CMakeLists.txt file works well on GNU/Linux (Ubuntu x86_64, 2.6.32-24-generic kernel) with gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 and GNU ld (GNU Binutils for Ubuntu) 2.20.1-system.20100303.  On GNU/Linux, the CMakeLists.txt file generates a makefile that successfully builds my program and links it with the VTK library.<br>

<br>
Here is the CMakeLists.txt file:<div class="im"><br>
<br>
cmake_minimum_required (VERSION 2.6)<br>
project (fdtd-cuda-1)<br>
find_package(VTK REQUIRED)<br>
include( ${VTK_USE_FILE} )<br>
include_directories(/Volumes/FILES/CODE-LIBRARY/utilities)<br>
include_directories(/Volumes/FILES/Programs/common/TNT)<br>
include_directories(/Volumes/FILES/Programs/common/boost/boost_1_43_0)<br>
include (${VTK_USE_FILE})<br>
add_executable (fdtd-cuda-1 main.cpp)<br>
target_link_libraries(fdtd-cuda-1 vtkHybrid)<br>
<br></div><div class="im">
Within the main.cpp file of my C++ program I am using the following VTK headers:<br>
<br>
#include &lt;vtkRenderWindow.h&gt;<br>
#include &lt;vtkRenderWindowInteractor.h&gt;<br>
#include &lt;vtkInteractorStyleImage.h&gt;<br>
#include &lt;vtkRenderer.h&gt;<br>
#include &lt;vtkJPEGReader.h&gt;<br>
#include &lt;vtkImageActor.h&gt;<br>
#include &lt;vtkCommand.h&gt;<br>
#include &lt;vtkCallbackCommand.h&gt;<br>
#include &lt;vtkSmartPointer.h&gt;<br>
<br></div>
Although the makefile generated by cmake builds without problems on Ubuntu GNU/Linux, a similarly-generated makefile produces the following errors on Mac OS X.  It appears that CMake is finding the VTK library in the Python.framework directory in lieu of the one installed into /usr/local/lib.  Here are the errors produced on Mac OS X:<br>

<br>
Matilda-2:FDTD-model-CUDA-1 nicholaskinar$ make<div class="im"><br>
Linking CXX executable fdtd-cuda-1<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkHybrid.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br></div><div><div></div><div class="h5">
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkRendering.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkGraphics.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkverdict.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkImaging.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkftgl.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkfreetype.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkIO.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkFiltering.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkCommon.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkDICOMParser.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkmetaio.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtksqlite.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkpng.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtktiff.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkzlib.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkjpeg.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkexpat.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtksys.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkexoIIc.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
ld: warning: in /Library/Frameworks/Python.framework/Versions/6.1/lib/vtk-5.4/libvtkNetCDF.dylib, file was built for i386 which is not the architecture being linked (x86_64)<br>
Undefined symbols:<br>
  &quot;vtkRenderer::New()&quot;, referenced from:<br>
      vtkSmartPointer&lt;vtkRenderer&gt;::New()        in main.cpp.o<br>
  &quot;vtkRenderWindowInteractor::SetRenderWindow(vtkRenderWindow*)&quot;, referenced from:<br>
      test_VTK()    in main.cpp.o<br>
  &quot;vtkRenderer::ResetCamera()&quot;, referenced from:<br>
      test_VTK()    in main.cpp.o<br>
  &quot;vtkJPEGReader::New()&quot;, referenced from:<br>
      vtkSmartPointer&lt;vtkJPEGReader&gt;::New()        in main.cpp.o<br>
  &quot;vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*, vtkSmartPointerBase::NoReference const&amp;)&quot;, referenced from:<br>
      vtkSmartPointer&lt;vtkJPEGReader&gt;::vtkSmartPointer(vtkJPEGReader*, vtkSmartPointerBase::NoReference const&amp;)in main.cpp.o<br>
      vtkSmartPointer&lt;vtkImageActor&gt;::vtkSmartPointer(vtkImageActor*, vtkSmartPointerBase::NoReference const&amp;)in main.cpp.o<br>
      vtkSmartPointer&lt;vtkRenderer&gt;::vtkSmartPointer(vtkRenderer*, vtkSmartPointerBase::NoReference const&amp;)in main.cpp.o<br>
      vtkSmartPointer&lt;vtkRenderWindow&gt;::vtkSmartPointer(vtkRenderWindow*, vtkSmartPointerBase::NoReference const&amp;)in main.cpp.o<br>
      vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::vtkSmartPointer(vtkRenderWindowInteractor*, vtkSmartPointerBase::NoReference const&amp;)in main.cpp.o<br>
      vtkSmartPointer&lt;vtkInteractorStyleImage&gt;::vtkSmartPointer(vtkInteractorStyleImage*, vtkSmartPointerBase::NoReference const&amp;)in main.cpp.o<br>
  &quot;vtkInteractorStyleImage::New()&quot;, referenced from:<br>
      vtkSmartPointer&lt;vtkInteractorStyleImage&gt;::New()        in main.cpp.o<br>
  &quot;vtkImageAlgorithm::GetOutput()&quot;, referenced from:<br>
      test_VTK()    in main.cpp.o<br>
  &quot;vtkRenderWindowInteractor::New()&quot;, referenced from:<br>
      vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New()        in main.cpp.o<br>
  &quot;vtkImageActor::New()&quot;, referenced from:<br>
      vtkSmartPointer&lt;vtkImageActor&gt;::New()        in main.cpp.o<br>
  &quot;vtkRenderWindow::New()&quot;, referenced from:<br>
      vtkSmartPointer&lt;vtkRenderWindow&gt;::New()        in main.cpp.o<br>
  &quot;vtkSmartPointerBase::~vtkSmartPointerBase()&quot;, referenced from:<br>
      vtkSmartPointer&lt;vtkInteractorStyleImage&gt;::~vtkSmartPointer()in main.cpp.o<br>
      vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::~vtkSmartPointer()in main.cpp.o<br>
      vtkSmartPointer&lt;vtkRenderWindow&gt;::~vtkSmartPointer()in main.cpp.o<br>
      vtkSmartPointer&lt;vtkRenderer&gt;::~vtkSmartPointer()in main.cpp.o<br>
      vtkSmartPointer&lt;vtkImageActor&gt;::~vtkSmartPointer()in main.cpp.o<br>
      vtkSmartPointer&lt;vtkJPEGReader&gt;::~vtkSmartPointer()in main.cpp.o<br>
  &quot;vtkRenderer::AddActor(vtkProp*)&quot;, referenced from:<br>
      test_VTK()    in main.cpp.o<br>
ld: symbol(s) not found<br>
collect2: ld returned 1 exit status<br>
make[2]: *** [fdtd-cuda-1] Error 1<br>
make[1]: *** [CMakeFiles/fdtd-cuda-1.dir/all] Error 2<br>
make: *** [all] Error 2<br>
<br></div></div>
What am I doing wrong here, and what should I change to ensure that CMake locates the proper version of VTK on Mac OS X?<div><div></div><div class="h5"><br>
<br>
Nicholas<br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>