Linker Probs in PB - GLUT

seedjar
Unregistered
 
Post: #1
So I wrote a little GLUT program to play with the accumulation buffer, but I get a strange error when the linker kicks in:

ld: /usr/lib/crt1.o illegal reference to symbol: __objcInit defined in indirectly referenced dynamic library /usr/lib/libobjc.A.dylib

This error only occurs when the GLUT library is checked for compiling, so I believe that's the problem. Of course, when it's not included, I get undefined symbol errors for the GLUT calls.
I've seen errors like this before when I mess up function overloading and such, but I don't know how to get in there are correct references for these files. The Apple documentation seems to deny the existance of the usr directory altogether so I can't find any info on what these files do or where I can find replacements.
Apple Care won't tell me anything without $50 - I'm a student so I really can't afford that without an assurance that they can help. I have a feeling I just have to replace a few files or something, and I don't think that's worth the money.
If anybody can help me, I'd be eternally grateful.

Thanks
~Joe Granville
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
This is the second most frequently asked question on these boards and on Apple's mailing lists. If you'd searched, I'm sure you could have found the answer.

Do one of the following:
  • link with Foundation.framework
  • link with Cocoa.framework
  • add [font=monaco,courier]-lobjc[/font] to your target's extra linker flags
Quote this message in a reply
seedjar
Unregistered
 
Post: #3
That did it. Thanks a lot.
~Joe Granville
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  SOIL linker errors kropcke 6 6,473 Aug 30, 2012 09:38 PM
Last Post: kropcke