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"><<a href="mailto:n.kinar@usask.ca">n.kinar@usask.ca</a>></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'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'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'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 <vtkRenderWindow.h><br>
#include <vtkRenderWindowInteractor.h><br>
#include <vtkInteractorStyleImage.h><br>
#include <vtkRenderer.h><br>
#include <vtkJPEGReader.h><br>
#include <vtkImageActor.h><br>
#include <vtkCommand.h><br>
#include <vtkCallbackCommand.h><br>
#include <vtkSmartPointer.h><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>
"vtkRenderer::New()", referenced from:<br>
vtkSmartPointer<vtkRenderer>::New() in main.cpp.o<br>
"vtkRenderWindowInteractor::SetRenderWindow(vtkRenderWindow*)", referenced from:<br>
test_VTK() in main.cpp.o<br>
"vtkRenderer::ResetCamera()", referenced from:<br>
test_VTK() in main.cpp.o<br>
"vtkJPEGReader::New()", referenced from:<br>
vtkSmartPointer<vtkJPEGReader>::New() in main.cpp.o<br>
"vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*, vtkSmartPointerBase::NoReference const&)", referenced from:<br>
vtkSmartPointer<vtkJPEGReader>::vtkSmartPointer(vtkJPEGReader*, vtkSmartPointerBase::NoReference const&)in main.cpp.o<br>
vtkSmartPointer<vtkImageActor>::vtkSmartPointer(vtkImageActor*, vtkSmartPointerBase::NoReference const&)in main.cpp.o<br>
vtkSmartPointer<vtkRenderer>::vtkSmartPointer(vtkRenderer*, vtkSmartPointerBase::NoReference const&)in main.cpp.o<br>
vtkSmartPointer<vtkRenderWindow>::vtkSmartPointer(vtkRenderWindow*, vtkSmartPointerBase::NoReference const&)in main.cpp.o<br>
vtkSmartPointer<vtkRenderWindowInteractor>::vtkSmartPointer(vtkRenderWindowInteractor*, vtkSmartPointerBase::NoReference const&)in main.cpp.o<br>
vtkSmartPointer<vtkInteractorStyleImage>::vtkSmartPointer(vtkInteractorStyleImage*, vtkSmartPointerBase::NoReference const&)in main.cpp.o<br>
"vtkInteractorStyleImage::New()", referenced from:<br>
vtkSmartPointer<vtkInteractorStyleImage>::New() in main.cpp.o<br>
"vtkImageAlgorithm::GetOutput()", referenced from:<br>
test_VTK() in main.cpp.o<br>
"vtkRenderWindowInteractor::New()", referenced from:<br>
vtkSmartPointer<vtkRenderWindowInteractor>::New() in main.cpp.o<br>
"vtkImageActor::New()", referenced from:<br>
vtkSmartPointer<vtkImageActor>::New() in main.cpp.o<br>
"vtkRenderWindow::New()", referenced from:<br>
vtkSmartPointer<vtkRenderWindow>::New() in main.cpp.o<br>
"vtkSmartPointerBase::~vtkSmartPointerBase()", referenced from:<br>
vtkSmartPointer<vtkInteractorStyleImage>::~vtkSmartPointer()in main.cpp.o<br>
vtkSmartPointer<vtkRenderWindowInteractor>::~vtkSmartPointer()in main.cpp.o<br>
vtkSmartPointer<vtkRenderWindow>::~vtkSmartPointer()in main.cpp.o<br>
vtkSmartPointer<vtkRenderer>::~vtkSmartPointer()in main.cpp.o<br>
vtkSmartPointer<vtkImageActor>::~vtkSmartPointer()in main.cpp.o<br>
vtkSmartPointer<vtkJPEGReader>::~vtkSmartPointer()in main.cpp.o<br>
"vtkRenderer::AddActor(vtkProp*)", 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>