Trying to do graphics (ccc_win) project on Xcode, X11 help

Discussion in 'Mac Programming' started by TommytheCat, May 18, 2010.

  1. TommytheCat macrumors newbie

    Joined:
    May 18, 2010
    #1
    I downloaded a sample project from this site: http://www.cs.drexel.edu/~mcs171/Wi07/Horstmann/Graphics/Mac/index.html

    Everything has gone exactly as planned except I get this error:
    Command /Developer/usr/bin/g++-4.2 failed with exit code 1

    when trying to run the sample project. I also get this warning:
    ld: warning: directory '/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib' following -L not found

    and

    ld: library not found for -lX11

    It says at the beginning that I have to install the X11 libraries, and I don't know what those are or how to do that. Also I think there might be something about a 10.4 sdk, and I have 10.5 and 10.6, not that I know what those are either. Obviously I'm quite inexperienced, and I'm not trying to do anything complicated, so can anyone help me out?
     
  2. mdatwood macrumors 6502a

    Joined:
    Mar 14, 2010
    Location:
    Denver, CO
    #2
    X11 should be available on the latest OSX DVD that you have as an optional package. I would get that installed then try again.
     
  3. TommytheCat thread starter macrumors newbie

    Joined:
    May 18, 2010
    #3
    I don't have that DVD, plus it wouldn't be the latest one. I'm thinking it's something to do with not having some 10.4 SDK, because the page says it's for mac 10.4 and I have 10.6.

    What is X11 by the way? Is it just something that makes that graphics window?
     
  4. mdatwood macrumors 6502a

    Joined:
    Mar 14, 2010
    Location:
    Denver, CO
    #4
    X11 is the underlying windowing protocol used in most Unix environments (linux for example).

    It's an optional install with OSX and I'm not sure if you can download somewhere else. Here is an older article that looks like Apple had it for download at one time or another.
     
  5. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #5
    Oh, you didn't install the X11 SDK when you installed Xcode, did you? That's why it's complaining. Reinstall Xcode with the X11 SDK.
     
  6. TommytheCat thread starter macrumors newbie

    Joined:
    May 18, 2010
    #6
    OMG I got it working guys holy crap! I really didn't think it would work, I just wanted to try it. This post made me look to see if I had it, and I did, just the 10.6 version, not the 10.4 version. It took me this whole time to notice the libraries in the sample project were red, (meaning not found) so I deleted them and replaced them with the same directory location but for 10.6, and boom!

    Thank you so much guys!
     

Share This Page