[CMake] dyld: library not loaded

Yifei Li yifli at mtu.edu
Wed Aug 31 09:04:28 EDT 2011


Hi all,

My app MeshVisualization uses a library called OpenMesh. I had a runtime error when running the app: 
dyld: Library not loaded: @executable_path/../Libraries/libOpenMeshCore.2.0.dylib
  Referenced from: /Users/yifli/Documents/MeshVisualization/build/Build/bin/MeshVisualization
  Reason: image not found


My FindOpenMesh.cmake does find the library and defines 
OPENMESH_LIBRARY:  OpenMeshCore
OPENMESH_LIBRARY_DIR: /usr/local/lib/OpenMesh

However, I noticed from compiling details:
ld: warning: directory not found for option '-L/usr/local/lib/OpenMesh/Debug'

So how should I solve the runtime problem? Thanks


Yifei

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110831/5f722b4c/attachment.htm>


More information about the CMake mailing list