hmmmmm, insane problem with Xcode?

dave05
Unregistered
 
Post: #1
hey everyone..

in the past little while, I've been scraping together a 2d sprite engine using AGL/OpenGL/Carbon. And I've finally reached the level at which I'd like to actually start testing the code - I finally brought the errors and warnings both to zero...

However, now Xcode is giving me a far more ridiculous error, that apparently occurs in the final stage of compilation:

(warning) warning prebinding disabled because of undefined symbols
(ERROR) Undefined symbols:
_aglSetDrawable
_aglSetFullScreen
_glFinish
_glFlush
_aglChoosePixelFormat
_aglCreateContext
_aglDestroyPixelFormat
_aglEnable
_aglGetError
_aglSetCurrentContext
_aglSwapBuffers
_aglUseFont
_glBegin
_glCallLists
_glClear
_glColor3f
_glColor4f
_glDisable
_glEnd
_glGenLists
_glListBase
_glLoadIdentity
_glMatrixMode
_glOrtho
_glRasterPos2i
_glVertex2f

ahhhhhh!!! Basically, ALL openGL symbols are undefined!!! but only after compilation! It's totally insane, as far as I'm concerned. I'm still on Panther and Xcode 1.5.... do you think that has something to do with it? Or..... Other possible problems? All my headers are precompiled, and if i take out "#include <AGL/agl.h> #include <OpenGL/glext.h>," I get hundreds of errors rather than just one HUGE LINKING ERROR.

Should I just get tiger? Will that solve anything?
Quote this message in a reply
Member
Posts: 114
Joined: 2005.03
Post: #2
Did you include the AGL and OpenGL framework in your project?
Quote this message in a reply
Member
Posts: 111
Joined: 2002.06
Post: #3
I had a similar problem trying to build a unit test target for an OpenGL program in Xcode 2.1. The cause of the problem was that the OpenGL and AGL frameworks were in my project, but not in the target.

Make sure the OpenGL and AGL frameworks are included in the target. Select the name of the project in the Groups and Files list. The target column is the rightmost column in the detail view and has checkboxes for each file and framework in your project. Selecting a file or framework adds the file or framework to the target. Make sure the checkboxes are selected for the OpenGL and AGL frameworks.

Mark Szymczyk
http://www.meandmark.com
Quote this message in a reply
Member
Posts: 116
Joined: 2002.04
Post: #4
Quote:ahhhhhh!!! Basically, ALL openGL symbols are undefined!!! but only after compilation! It's totally insane, as far as I'm concerned. I'm still on Panther and Xcode 1.5.... do you think that has something to do with it? Or..... Other possible problems? All my headers are precompiled, and if i take out "#include <AGL/agl.h> #include <OpenGL/glext.h>," I get hundreds of errors rather than just one HUGE LINKING ERROR.

Should I just get tiger? Will that solve anything?

The errors are not ridiculous and you don't need to buy Tiger.

The linker is simply telling you that your project is not setup correctly to link AGL and OpenGL frameworks. Fix that and the errors will go away.

Wade
Quote this message in a reply
Member
Posts: 321
Joined: 2004.10
Post: #5
Just to flesh out the above answers (which are right, btw) when you
go into you Xcode project and in the left side window under
External Frameworks and Libraries, Do you see OpenGL.framework etc.
They will have the cute little toolbox icons (a least in Xcode 2.0)
If not, then click on the External Frame.. and Project->Add to Project.
Then through the chooser select the frameworks you need.

The good news is that you are alost there.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  iPad, OpenGL ES, and XCode Instruments problem! Bandit 0 3,886 Dec 13, 2010 01:21 PM
Last Post: Bandit
  Weird problem in xcode SDL skrew 3 3,304 May 27, 2006 08:43 AM
Last Post: Greywhind
  OpenGL problem in Xcode deployment build grandall 6 4,031 Mar 29, 2006 11:12 AM
Last Post: grandall