title: Qt 4.7 + VTK 5.6.1 on Mac OS X 10.6: errors linking projects
body: <p>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:
  - VTK distribution: 5.6.1
  - Qt IDE: Qt creator 2.7.1 (based on Qt 4.7.0)
  - Mac OS X version: 10.6.6</p>
  
  <p>Also in the .pro project file on Qt I've included my vtk headers and lib directories:  </p>
  
  <blockquote>
    <p><em>INCLUDEPATH += /Users/catamigue/Documents/Migue/Developer/bin/vtk561/include/vtk-5.6</em><br>
        <em>LIBS += -L/Users/catamigue/Documents/Migue/Developer/bin/vtk561Dyn/lib/vtk-5.6</em></p>
  </blockquote>
  
  <p>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):</p>
  
  <blockquote>
    <p><strong>:: error: symbol(s) not found</strong><br>
    <strong>:: error: collect2: ld returned 1 exit status</strong></p>
  </blockquote>
  
  <p>also from the "compile output" tab I get this after building:</p>
  
  <blockquote>
    <p>ld: warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib' following -L not found<br>
    ld: warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib' following -F not found<br>
    <strong>Undefined symbols</strong>:<br>
    "vtkSmartPointerBase::~vtkSmartPointerBase()", referenced from:<br>
    vtkSmartPointer::~vtkSmartPointer()in simpleview.o<br>
    vtkSmartPointer::~vtkSmartPointer()in simpleview.o<br>
    vtkSmartPointer::~vtkSmartPointer()in simpleview.o<br>
    vtkSmartPointer::~vtkSmartPointer()in simpleview.o<br>
    vtkSmartPointer::~vtkSmartPointer()in simpleview.o<br>
    "vtkAlgorithm::GetOutputPort(int)", referenced from:<br>
    vtkAlgorithm::GetOutputPort() in simpleview.o<br>
    "vtkActor::New()", referenced from:<br>
    vtkSmartPointer::New() in simpleview.o<br>
    "vtkSphereSource::New()", referenced from:<br>
    vtkSmartPointer::New() in simpleview.o<br>
    "QVTKWidget::QVTKWidget(QWidget*, QFlags)", referenced from:<br>
    Ui_SimpleView::setupUi(QMainWindow*) in simpleview.o<br>
    Ui_SimpleView::setupUi(QMainWindow*) in simpleview.o<br>
    "vtkRenderer::AddActor(vtkProp*)", referenced from:<br>
    SimpleView::SimpleView()in simpleview.o<br>
    SimpleView::SimpleView()in simpleview.o<br>
    SimpleView::SimpleView()in simpleview.o<br>
    SimpleView::SimpleView()in simpleview.o<br>
    "vtkCubeSource::New()", referenced from:<br>
    vtkSmartPointer::New() in simpleview.o<br>
    "vtkPolyDataMapper::New()", referenced from:<br>
    vtkSmartPointer::New() in simpleview.o<br>
    "vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*, vtkSmartPointerBase::NoReference const&amp;)", referenced from:<br>
    vtkSmartPointer::vtkSmartPointer(vtkSphereSource*, vtkSmartPointerBase::NoReference const&amp;)in simpleview.o<br>
    vtkSmartPointer::vtkSmartPointer(vtkCubeSource*, vtkSmartPointerBase::NoReference const&amp;)in simpleview.o<br>
    vtkSmartPointer::vtkSmartPointer(vtkPolyDataMapper*, vtkSmartPointerBase::NoReference const&amp;)in simpleview.o<br>
    vtkSmartPointer::vtkSmartPointer(vtkActor*, vtkSmartPointerBase::NoReference const&amp;)in simpleview.o<br>
    vtkSmartPointer::vtkSmartPointer(vtkRenderer*, vtkSmartPointerBase::NoReference const&amp;)in simpleview.o<br>
    "vtkRenderer::New()", referenced from:<br>
    vtkSmartPointer::New() in simpleview.o<br>
    <strong>ld: symbol(s) not found</strong><br>
    <strong>collect2: ld returned 1 exit status</strong><br>
    <strong>make: <em></strong> [01SimpleView.app/Contents/MacOS/01SimpleView] Error 1</em>*<br>
    make: Leaving directory `/Users/catamigue/Documents/Migue/Polimi/Programming/Qt/Learning   code/Qt + VTK + ITK/01SimpleView-build-desktop'<br>
    <strong>The process "/usr/bin/make" exited with code %2.</strong>
    *<em>Error while building project 01SimpleView (target: Desktop)</em>*
    <strong>When executing build step 'Make'</strong></p>
  </blockquote>
  
  <p>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...</p>
  
  <p>Also some additional information of how vtk5.6.1 was built on my Mac:<br>
  - CMake version: 2.8.1.<br>
  - CMake parameters (using CMake interface, not command line):  </p>
  
  <blockquote>
    <p>BUILD_EXAMPLES = OFF<br>
    BUILD_SHARED_LIBS = OFF<br>
    BUILD_TESTING = OFF<br>
    CMAKE_BUILD_TYPE = Release<br>
    CMAKE_OSX_ARCHITECTURE = x86_64<br>
    VTK_USE_GUI_SUPPORT = ON<br>
    VTK_USE_QT = ON  </p>
  </blockquote>
  
  <p>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!</p>
  
  <p>I've also successfully built all of the Qt examples (not including VTK)...</p>
  
  <p>Any comments?</p>
  
  <p>Thanks,
  Miguel</p>