xcode help

Discussion in 'Mac Programming' started by cdsboy, Jul 8, 2006.

  1. macrumors newbie

    Joined:
    Jul 8, 2006
    #1
    i am trying to compile a program. i am getting this error and i have no idea what it means. Undefined symbols: _jpgalleg_init _load_jpg
     
  2. macrumors member

    Joined:
    Jun 27, 2006
    #2
    It means you need to link against libjpeg. Install it using either Fink or DarwinPorts and then in XCode, add libjpeg to the XCode project.
     
  3. thread starter macrumors newbie

    Joined:
    Jul 8, 2006
    #3
    how do i link a library? oh and i think it is talking about jpgalleg since its required for the program
     
  4. macrumors member

    Joined:
    Jun 27, 2006
    #4
    Yeah, I was wrong about libjpeg (that'll teach me to only look at one of the missing symbols...) To link against a library, you need to add the library, which will have an extension of either .a or .dylib to the XCode project. XCode should take care of the rest.

    Is this program that you're compiling designed for generic *nix operating systems? If so, you might want to follow the standard configure / make procedure.
     
  5. thread starter macrumors newbie

    Joined:
    Jul 8, 2006
    #5
    ok thx. now how do i get to a file thats in /usr/bin??
     
  6. macrumors member

    Joined:
    Jun 27, 2006
    #6
    Command-shift-G in either the add dialog or the Finder, then type in "/usr/bin".

    Note however that bin directories should only have applications, and libraries should have been installed into a "lib" directory, e.g. /usr/lib or /usr/local/lib.
     
  7. thread starter macrumors newbie

    Joined:
    Jul 8, 2006

Share This Page