find what's inside a .lib and/or properly linking to a .lib

Discussion in 'Mac Programming' started by mhoemann, Jun 7, 2008.

  1. mhoemann macrumors newbie

    Joined:
    Jun 7, 2008
    #1
    I'm not new to C++ or C by any means, but I am relatively new to mac programming, specifically xcode. I'm having trouble with a program that's using a couple of .libs. It's giving me the errors "myfunction" referenced from: like it can't find the functions. I've tried everything I can think of, and I'm completely stumped.

    I guess my question is twofold. First off, how DO you properly link .libs using xcode? (I'm using 6, for what it's worth, but i understand it's about the same as recent older versions)

    And is there a terminal function or something to print out what functions are in a .lib? I'm positive the functions are there, it's just that after 8 hours of banging my head on this, I want to be 100%
     
  2. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #2
    to answer your second question, you can use the 'nm' command to print out an object file's symbol table; i frequently use it to debug 'symbol not found' linker errors.
     

Share This Page