开发者

building a gl3 app under cygwin

i've got a small opengl 3.2 app that i've been developing on linux using the standard gnu tools (gmake/gcc). the code seems pretty portable--i had no problems running it on osx until i started using gl3 features that the mac mini gl drivers don't seem to support. i've got a bootcamp partition with windows xp on the same mini, and i'd like to run my app there if possible.

the windows drivers definitely support gl 3.2, but i'm having trouble linking. this seems like a really common issue, but i haven't found any answers online that address using opengl > 1.2 under cygwin. i'm using glew-1.5.5 and linking like so:

g++ -o glToy *.o -L/cygdrive/c/Program\ Files/glew-1.5.5/lib -lglew32 -lglut32 -lglu32 -lopengl32

but i get a whole lot of this sort of output:

Program.o:/home/Jacob/glToy/Program.cpp:134: undefined reference to `__imp____glewUseProgram'
Program.o:/home/Jacob/glToy/Program.cpp:235: undefined reference to `__imp____glewActiveTexture'
Program.o:/home/开发者_高级运维Jacob/glToy/Program.cpp:73: undefined reference to `__imp____glewGetShaderiv'
...

any ideas what i'm doing wrong? or perhaps this isn't a workable setup? other ideas for getting this going on the mac mini (2009 version)? thanks!


you can also skip linking, just get glew.c and put it in /include (not /include/GL like glew.h) and then change your #include to <glew.c>


you aren't linking glew properly or glew is broken... nothing to do with gl itself

the easy fix is just to use the extension api and forget about glew.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜