PDA

View Full Version : Wierd Linking Errors


Sta7ic
2002.08.12, 11:06 PM
I'm trying to make a small OGL program using Cpp in ProjectBuilder that has a class that handles model arrays, loading, and saving. I've written all the code out, and it returns the linking error:

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

I've looked through some OS X NeHe tutorials, and at least Lesson 8 compiles fine -- using the standard C compiler. What's going wrong?

-Sta7ic

OneSadCookie
2002.08.12, 11:17 PM
You need to include Cocoa.framework in your project.

(or include Foundation.framework or add -lobjc to the linker flags or ...)

This error is usually seen by people using GLUT, not realizing that MacOSX's GLUT implementation uses Cocoa.

Sta7ic
2002.08.13, 10:47 AM
I knew I should've started learning Cocoa earlier :P

Thanks.