[Cocoa newbie] ld: can't locate file for: -lcrt1.o

Blippy

Registered
I'm learning Cocoa using the Cocoa For Dummies book (yes, mock me if you must!). Although I'm using Panther, I decided to use Project Builder and Interface Builder rather than XCode, figuring it would be easier to follow the book for a few days, after which I'd switch over to XCode.

Well, I've just completed the first little tutorial, but when I try to build and run it, I get the error:

"ld: can't locate file for: -lcrt1.o"

I'm quite sure it's nothing to do with the code (it basically just adds two numbers together) so I'm guessing it's the combination of Panther and PB/IB. I had read elsewhere that people were using Panther and PB/IB successfully together so if anyone can help me out, I'd really appreciate it.

Thanks a lot!
 
Where did you read that Panther could be used with the older developer tools? IIRC Xcode shipped alongside Panther, so I don't see any reason for you to use PB. Did you really have a hard enough time using Xcode alongside the book that you had to go back?

That being said, that linker flag ought to just be -lcrt1

You could poke around in your target settings in PB until you find -lcrt1.o and change it, but I can't tell you exactly how, since it has been over a year since I touched PB.
 
I was trying to compile a program tonight that was made in Xcode 1.2 with Xcode 1.1, but I was getting that same linker error. Not any help to you, but I didn't know what it meant.

I'm pretty sure that you're not supposed to use Project Builder on Panther... or is it just that you can't use Xcode on anything less than Panther? I forget. Xcode's interface isn't that different that it should be confusing.
 
crt1.o is part of the C runtime and if the linker is not finding it you are kind of screwed. Not that it is not insurmountable but rather because it is a sign that your compiler instillation is screwed up. One thing to do is use the 'gcc_select' command at the terminal to make sure that you are using 3.3 or which ever is the newest on your box. If the compiler is looking for files from the wrong version it could manifest this way. The surest thing would be to uninstall both project builder and xcode and then reinstall just xcode.
 
Back
Top