Mac OS X: Linking to shared library

  • Richard Connamacher

    This seems like a complete newbie question, but how do I get XCode to pass the linking stage?

    Compile works but build fails with the following error:

    Undefined symbols:
      "_AAFGetLibraryVersion", referenced from:
          _main in main.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

    Code simply tries to display the current version of the AAF SDK (to test that it's loaded). I've included the AAF.h header (which is why it compiles), and I've moved the three dylib's into /usr/local/lib (where dlopen does find them, I've checked).

    How do I tell the linker in XCode where to find those dylibs so it can pass the linking stage?


    • Richard Connamacher

      I figured out a solution finally. I just added this under Other Linker Flags in XCode's Project Settings:


      It compiles now and is correctly printing the version information.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks