I can expand on this a bit, and give my own perspective. A bundled app on OS X can find run-time libraries in three ways:<br><div><br>1) it can find them in the system paths, e.g. in /usr/lib or in /System/Library/Frameworks<div>
<br></div><div>2) it can find them within the bundle itself, i.e. within MyApplication.app/Contents/MacOS or in MyApplication.app/Contents/Frameworks/</div><div><br></div><div>3) it can find them in the DYLD_LIBRARY_PATH</div>
<div><br></div><div>When I'm ready to deploy my app I do a "make install" that copies all the Qt and VTK libraries into my bundle. CMake can automatically figure out the dependencies and modify the libraries and the executable so that they can find each other within the bundle, which makes it unnecessary to use DYLD_LIBRARY_PATH with a bundle created via "make install".</div>
<div><br></div><div>But like Mike suggested, I stick to using DYLD_LIBRARY_PATH and running my programs from the terminal until I'm ready to deploy them. It's only when I'm ready to deploy that I do a "make install" to create a stand-alone bundle.</div>
<div><br></div><div> - David</div><div><br><br>On Fri, Jan 4, 2013 at 3:28 PM, Michael Jackson <<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>> wrote:<br>> Set the DYLD_LIBRARY_PATH to include the directory where the vtk libraries are located. From a bash shell it is something like this:<br>
><br>> export DYLD_LIBRARY_PATH=/Path/To/Your/Built/VTK<br>><br>> Then try to run the executable from that same terminal.<br>> --<br>> Mike Jackson <<a href="http://www.bluequartz.net">www.bluequartz.net</a>><br>
><br>> On Jan 4, 2013, at 5:25 PM, Berkowitz, Benjamin M wrote:<br>><br>>> I'm not sure if this is relevant, but I got this error when running the executable in the terminal:<br>>><br>>> dyld: Library not loaded: libQVTK.5.10.dylib<br>
>> Referenced from: /Users/benberkowitz/Desktop/EventQtSlotConnect/build/EventQtSlotConnect.app/Contents/MacOS/EventQtSlotConnect<br>>> Reason: image not found<br>>> Trace/BPT trap: 5<br>>><br>>><br>
>> Ben<br>>><br>>><br>>> On Jan 4, 2013, at 4:16 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>>> wrote:<br>>><br>>>> Ben and David,<br>
>>><br>>>> I have fixed the wiki template for the vtk/qt cmakelists.txt file. The<br>>>> tarbars should be updated tonight.<br>>>><br>>>> Thanks for the feedback and help,<br>
>>><br>
>>> Bill<br>>>><br>>>> On Fri, Jan 4, 2013 at 4:59 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<br>>>>> David,<br>>>>><br>
>>>> Looks like VTK5.10 does not include QVTK in its list of libraries.<br>>>>><br>>>>> I will have to work out a solution that works for both VTK5 and VTK6.<br>>>>><br>>>>> Ben,<br>
>>>><br>>>>> for the time being add QVTK to ythe list of target_link_libraries.<br>>>>><br>>>>> Bill<br>>>>><br>>>>> On Fri, Jan 4, 2013 at 4:51 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<br>
>>>>> Hmmm. VTK_LIBRARIES should include that.<br>>>>>><br>>>>>> I'll verify on my linux build with VTK5. It's very easy to fix all the<br>>>>>> qt examples on the wiki since they use a wiki template.<br>
>>>>><br>>>>>> Thanks David.<br>>>>>><br>>>>>> Bill<br>>>>>><br>>>>>><br>>>>>> On Fri, Jan 4, 2013 at 4:31 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>>>>>> I just tried building that example against my own VTK 5.10.1,<br>>>>>>> which is built with VTK_USE_QT, and Qt4.8.3. I saw exactly<br>>>>>>> the same error that Ben reported:<br>
>>>>>><br>>>>>>> Undefined symbols:<br>>>>>>> "QVTKWidget::QVTKWidget(QWidget*, QFlags<Qt::WindowType>)"<br>>>>>>><br>>>>>>> When built against VTK 5.10 (or VTK 5.10.1), this example is not<br>
>>>>>> linking to the QVTK library. Its CMakeLists.txt has to be fixed.<br>>>>>>><br>>>>>>> - David<br>>>>>>><br>>>>>>><br>>>>>>> On Fri, Jan 4, 2013 at 2:21 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<br>
>>>>>>> I'm builid a VTK5 QT 4.7.4 on linux right now. Later I'll try my Mac,<br>>>>>>>> but I don't think I use Qt 4.8.<br>>>>>>>><br>>>>>>>> David may be correct that the CMakeLists.txt file is broken.<br>
>>>>>>> Unfortunately, we can only test so many combinations of VTK/Qt<br>>>>>>>> versions.<br>>>>>>>><br>>>>>>>> Bill<br>>>>>>>><br>
>>>>>>> On Fri, Jan 4, 2013 at 4:19 PM, Berkowitz, Benjamin M<br>>>>>>>> <<a href="mailto:benjamin-berkowitz@uiowa.edu">benjamin-berkowitz@uiowa.edu</a>> wrote:<br>>>>>>>>> VTK 5.10.1 and Qt 4.8.4<br>
>>>>>>>><br>>>>>>>>> The options that I changed from default were:<br>>>>>>>>> VTK_USE_QT = ON<br>>>>>>>>> VTK_USE_GUISUPPORT = ON<br>
>>>>>>>> BUILD_SHARED_LIBS = ON<br>>>>>>>>><br>>>>>>>>> and as a side note, I've tried using CMAKE_BUILD_TYPE as both Debug and Release mode with the same result. For now I left it as the default Debug.<br>
>>>>>>>><br>>>>>>>>><br>>>>>>>>> On Jan 4, 2013, at 3:11 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<br>
>>>>>>>><br>>>>>>>>>> And VTK 5.10?<br>>>>>>>>>><br>>>>>>>>>><br>>>>>>>>>> On Fri, Jan 4, 2013 at 4:09 PM, Berkowitz, Benjamin M<br>
>>>>>>>>> <<a href="mailto:benjamin-berkowitz@uiowa.edu">benjamin-berkowitz@uiowa.edu</a>> wrote:<br>>>>>>>>>>> Yes<br>>>>>>>>>>><br>
>>>>>>>>>><br>>>>>>>>>>> On Jan 4, 2013, at 3:02 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>>>>>>>>>>> wrote:<br>
>>>>>>>>>><br>>>>>>>>>>>> Is your VTK built with QT turned on?<br>>>>>>>>>>>><br>>>>>>>>>>>> On Fri, Jan 4, 2013 at 3:57 PM, Berkowitz, Benjamin M<br>
>>>>>>>>>>> <<a href="mailto:benjamin-berkowitz@uiowa.edu">benjamin-berkowitz@uiowa.edu</a>> wrote:<br>>>>>>>>>>><br>>>>>>>>>><br>
>>>>>>>>><br>>>>>>>>>><br>>>>>>>>>> --<br>>>>>>>>>> Unpaid intern in BillsBasement at noware dot com<br>>>>>>>>><br>
>>>>>>><br>>>>>>>><br>>>>>>>><br>>>>>>>> --<br>>>>>>>> Unpaid intern in BillsBasement at noware dot com<br>>>>>><br>
>>>>><br>>>>>><br>>>>>> --<br>>>>>> Unpaid intern in BillsBasement at noware dot com<br>>>>><br>>>>><br>>>>><br>>>>> --<br>
>>>> Unpaid intern in BillsBasement at noware dot com<br>>>><br>>>><br>>>><br>>>> --<br>>>> Unpaid intern in BillsBasement at noware dot com<br></div></div>