PDA

View Full Version : glew file



MacUser
06-23-2008, 01:20 AM
Hi,
I'm working in Mac 10.4.11,I'm using openGl framework and glew library.I've succesfully added openGl frame work and libGlew.a static library.It compiles fine.But shows linker errors,I've also added flags -framework OpenGL and -IGLEW ,But still shows linker errors.
ld: Undefined symbols:
___GLEW_VERSION_1_5
___glewBindBuffer
___glewBindBufferARB
___glewBufferData
___glewBufferDataARB
___glewDeleteBuffers
___glewDeleteBuffersARB
___glewGenBuffers
___glewGenBuffersARB
___glewGetBufferParameteriv
___glewGetBufferParameterivARB


ld: Undefined symbols:
_glBegin
_glColor3f
_glDisable
_glEnd
_glLineWidth
_glPopAttrib
_glPushAttrib
_glVertex3dv
_glVertex3d
_gluErrorString
_gluTessBeginContour
_gluTessBeginPolygon
_gluTessCallback
_gluTessEndContour
_gluTessEndPolygon
_gluTessNormal
_gluTessProperty
_gluTessVertex
_glBindTexture
_glBlendFunc
_glColor4f
_glColorMaterial
_glColorPointer
_glCullFace
_glDisableClientState
_glDrawElements
_glEnable
_glEnableClientState
....................

Please help me.Thanks.

OneSadCookie
06-23-2008, 02:13 AM
The last lot are OpenGL, clearly your "-framework OpenGL" hasn't stuck.

scratt
06-23-2008, 08:19 PM
I am presuming you are using XCode.

Did you use any kind of template for the project?
There are templates for OpenGL projects, which would then require only adding the Glew stuff.

Anyway.. In XCode:

In the Targets section, down on the left hand side, take a look at the folders inside that. It should have your project listed there with various subfolders...

You will have a 'Compile Sources' folder, and maybe a 'Copy Bundle Resources' folder.

You should also have at least a 'Link Binary With Libraries' containing the OpenGL framework, and the Glew lib.

You can make those folders if they are not there by right clicking and then grab copies of Glew and OpenGL from the source area above and drop them in there.

And unless you have glew somewhere like /usr/lib then you'll also need to put Glew into the 'Copy Frameworks into .app' subfolder.

Also (not related to this - but it might bite you later) do check you have the right version of Glew, based on your machine PPC / Intel or better still : Universal.

MacUser
06-24-2008, 12:00 AM
Thanks for your reply,All the settings are given properly,But still having same errors.In debug configuration it build successfully,problem is with only in release configuration.

OneSadCookie
06-24-2008, 07:06 PM
If it builds correctly in debug, a) make sure you've turned ZeroLink off if you're using Xcode 2.5 or earlier, and b) try copying your target settings from the "Debug" configuration to the "Release" configuration.