Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

TommytheCat

macrumors newbie
Original poster
May 18, 2010
3
0
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?
 
X11 should be available on the latest OSX DVD that you have as an optional package. I would get that installed then try again.

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?
 
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.
 
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.
 
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.

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!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.