<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Hi!<div><br></div><div>I'm UNSUCCESSFULLY trying to build the Qt + VTK examples included in VTK's 5.6.1 distribution (.../VTK/Examples/GUI/Qt/). Here's what I'm using:</div>
<div>- VTK distribution: 5.6.1</div><div>- Qt IDE: Qt creator 2.7.1 (based on Qt 4.7.0)</div><div>- Mac OS X version: 10.6.6</div><div><br></div><div>Also in the .pro project file on Qt I've included my vtk headers and lib directories:</div>
<div><pre style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(128, 0, 128); ">INCLUDEPATH</span> += /Users/catamigue/Documents/Migue/Developer/bin/vtk561/<span style="color: rgb(128, 128, 0); ">include</span>/vtk-5.6</pre>
<pre style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><pre style="white-space: pre-wrap; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(128, 0, 128); ">LIBS</span> += -L/Users/catamigue/Documents/Migue/Developer/bin/vtk561Dyn/lib/vtk-5.6</pre></pre></div><div><br></div><div>Regardless of the example I'm trying to build (Events, GraphicView, ImageViewer or SimpleView), after trying to build the project on Qt creator I always get the same error (in "Build issues" tab on Qt Creator):</div>
<div>:: error: symbol(s) not found</div><div>:: error: collect2: ld returned 1 exit status</div><div><br></div><div>also from the "compile output" tab I get this after building:</div><div><br></div><div><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">ld: warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib' following -L not found</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">ld: warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib' following -F not found</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">Undefined symbols:</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">"vtkSmartPointerBase::~vtkSmartPointerBase()", referenced from:</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkRenderer>::~vtkSmartPointer()in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkCubeSource>::~vtkSmartPointer()in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkActor>::~vtkSmartPointer()in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkPolyDataMapper>::~vtkSmartPointer()in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkSphereSource>::~vtkSmartPointer()in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">"vtkAlgorithm::GetOutputPort(int)", referenced from:</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkAlgorithm::GetOutputPort() in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">"vtkActor::New()", referenced from:</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkActor>::New() in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">"vtkSphereSource::New()", referenced from:</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkSphereSource>::New() in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">"QVTKWidget::QVTKWidget(QWidget*, QFlags<Qt::WindowType>)", referenced from:</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">Ui_SimpleView::setupUi(QMainWindow*) in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">Ui_SimpleView::setupUi(QMainWindow*) in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">"vtkRenderer::AddActor(vtkProp*)", referenced from:</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">SimpleView::SimpleView()in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">SimpleView::SimpleView()in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">SimpleView::SimpleView()in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">SimpleView::SimpleView()in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">"vtkCubeSource::New()", referenced from:</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkCubeSource>::New() in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">"vtkPolyDataMapper::New()", referenced from:</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkPolyDataMapper>::New() in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">"vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*, vtkSmartPointerBase::NoReference const&)", referenced from:</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkSphereSource>::vtkSmartPointer(vtkSphereSource*, vtkSmartPointerBase::NoReference const&)in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkCubeSource>::vtkSmartPointer(vtkCubeSource*, vtkSmartPointerBase::NoReference const&)in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkPolyDataMapper>::vtkSmartPointer(vtkPolyDataMapper*, vtkSmartPointerBase::NoReference const&)in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkActor>::vtkSmartPointer(vtkActor*, vtkSmartPointerBase::NoReference const&)in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkRenderer>::vtkSmartPointer(vtkRenderer*, vtkSmartPointerBase::NoReference const&)in simpleview.o</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">"vtkRenderer::New()", referenced from:</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">vtkSmartPointer<vtkRenderer>::New() in simpleview.o</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">ld: symbol(s) not found</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">collect2: ld returned 1 exit status</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">make: *** [01SimpleView.app/Contents/MacOS/01SimpleView] Error 1</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">make: Leaving directory `/Users/catamigue/Documents/Migue/Polimi/Programming/Qt/Learning code/Qt + VTK + ITK/01SimpleView-build-desktop'</p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="font-weight: 600; color: rgb(255, 0, 0); ">The process "/usr/bin/make" exited with code %2.</span></p>
<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style="color: rgb(255, 0, 0); ">Error while building project 01SimpleView (target: Desktop)</span></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(255, 0, 0); ">When executing build step 'Make'</span></p></div><div><br></div><div>from what I've read in other forums this might be an error during linking... and I don't know what to do!... Please, some guidance will be really appreciated...</div>
<div><br></div><div>Also some additional information of how vtk5.6.1 was built on my Mac:</div><div>- CMake version: 2.8.1.</div><div>- CMake parameters (using CMake interface, not command line):</div><div>BUILD_EXAMPLES = OFF</div>
<div>BUILD_SHARED_LIBS = OFF</div><div>BUILD_TESTING = OFF</div><div>CMAKE_BUILD_TYPE = Release</div><div>CMAKE_OSX_ARCHITECTURE = x86_64</div><div>VTK_USE_GUI_SUPPORT = ON</div><div>VTK_USE_QT = ON</div><div><br></div><div>
I've also tried by recompiling VTK with universal binaries (by changing CMAKE_OSX_ARCHITECTURE) and by building the projects in Qt Creator both in Debug and Release modes... And nothing!</div><div><br></div><div>I've also successfully built all of the Qt examples (not including VTK)...</div>
<div><br></div><div>Any comments?</div><div><br></div><div>Thanks,</div><div>Miguel</div></span>