Link error adding NSImage

Discussion in 'Mac Programming' started by Tim-Black-Isle, Nov 1, 2008.

  1. Tim-Black-Isle macrumors newbie

    Nov 1, 2008
    I am an old geezer returning to programming after a 20 year gap..

    I have worked through Kochan objective-C and having done that have been building an app for several weeks ok, but I have got stuck now.

    i am building a command line app, i now want to a call to NSimage (not that I want to display anything just want to resize a jpeg in a file).

    but i get an error in the linker complaining that NSimage symbol not found.

    I have spent all evening on this without luck.

    Any help gratefully received -

    Tim (sorry to be an ignorant newbie .......just as I was in the 1970s)
  2. kpua macrumors 6502

    Jul 25, 2006
    When compiling from the command line, add "-framework AppKit" to link with AppKit (including NSImage).
  3. Tim-Black-Isle thread starter macrumors newbie

    Nov 1, 2008
    Gave me the clue I needed

    Thanks very much,

    I was actually using Xcode (how wonderful is that compared to seperate edit compile link phases) but taking your clue I added App.kit as an external framework in Xcode and it did the trick - thank you very very much - from this cold Scottish hillside!


Share This Page