genekogan / ofxLeapMotion2

A wrapper for the Leap Motion SDK compatible with Leap 2.0 Beta with skeletal tracking
MIT License
61 stars 33 forks source link

dyld: Library not loaded #8

Closed NiccoloGranieri closed 8 years ago

NiccoloGranieri commented 8 years ago

I had an issue running the example XCode project, due to the dyld: Library not loaded problem.

I noticed after a while this comment on the ofApp.cpp file:

/* Note on OS X, you must have this in the Run Script Build Phase of your project. where the first path ../../../addons/ofxLeapMotion2/ is the path to the ofxLeapMotion addon.

cp -f ../../../addons/ofxLeapMotion2/libs/lib/osx/libLeap.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libLeap.dylib"; install_name_tool -change ./libLeap.dylib @executable_path/libLeap.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME";

If you don't have this you'll see an error in the console: dyld: Library not loaded: @loader_path/libLeap.dylib */

My question is, speaking of an XCode project, why is this comment there? Why isn't the line directly implemented in Run Script Build Phase?

If you let me, I could file a Pull Request, and solve the issue!

genekogan commented 8 years ago

a PR would be very welcome thanks!