Xcode 4 Dynamic Linking - Not working AT ALL

Discussion in 'Mac Programming' started by rcplusplus, Aug 7, 2012.

  1. macrumors newbie

    Aug 7, 2012
    I've been trying to solve this for a while, but I can't come up with a solution. I have a Xcode project that uses the box2d c++ library. I'm trying to link against the .dylib file, but nothing seems to work!

    1. Created a new SFML application (I used project templates provided by SFML, so the project is set up correctly for that library)
    2. Went to the "Targets", selected my application, and added my .dylib file in the "Link Binary With Libraries" section
    3. Created a new "Copy Files" build phase, set it to "Frameworks", and added the .dylib file
    4. Set the "Dynamic Library Install Name" option in the "Build Settings" tab to "@loader_path/../Frameworks/libBox2D.2.1.0.dylib"
    5. Successfully compiled my project with no errors whatsoever
    6. Ran the project and got the following runtime-error:
    What did I do wrong? This seems to be what everyone does to link their .dylib files to their projects. Am I missing something big? Or is the specific .dylib file simply un-linkable?

Share This Page