[vtkusers] Library not loaded: libvtkCommon.5.8.dylib

Yifei Li yifli82 at gmail.com
Fri Sep 16 14:43:02 EDT 2011


Hi all,

I got the following runtime error (no building errors):

*dyld: Library not loaded: libvtkCommon.5.8.dylib*

*  Referenced from:
/Users/yifli/Documents/Projects/InteractiveSegmentation/build/Debug/InteractiveSegmentation
*
*  Reason: image not found*

However, I checked that libvtkCommon.5.8.dylib does exist:
-rwxr-xr-x   1 root  wheel  3327352 Sep 14 21:56 libvtkCommon.5.8.0.dylib
lrwxr-xr-x   1 root  wheel       24 Sep 14 21:27 libvtkCommon.5.8.dylib ->
libvtkCommon.5.8.0.dylib
lrwxr-xr-x   1 root  wheel       22 Sep 14 21:27 libvtkCommon.dylib ->
libvtkCommon.5.8.dylib

The application I'm trying to run is a QMainWindow that has a QVTKWidget in
it.  The CMakeLists.txt I use is:

cmake_minimum_required(VERSION 2.8)

project(Simple)

find_package(VTK)
include(${VTK_USE_FILE})

find_package(Qt4)
include(${QT_USE_FILE})

include_directories(${CMAKE_CURRENT_BINARY_DIR})

set(headers MainWindow.h)
set(srcs main.cpp MainWindow.cpp)
set(uis mainwindow.ui)

qt4_wrap_ui(ui_srcs ${uis})
qt4_wrap_cpp(moc_headers ${headers})

add_executable(Simple ${srcs} ${ui_srcs} ${moc_headers} ${headers})
target_link_libraries(Simple
                ${QT_LIBRARIES}
                ${VTK_LIBRARIES}
                QVTK
)

Yifei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110916/c3689088/attachment.htm>


More information about the vtkusers mailing list