我想在cygwin中編譯GLEW。我從網站下載了1.11.0版本的glew,並將其解壓到C:\glew-1.11.0\
。然後,在導航到cygwin中的文件夾(以admin身份運行)並執行make
後,出現以下錯誤。做make all
也一樣(如果這很重要)。用Cygwin編譯GLEW,未定義的引用(大部分爲glXGetProcAddressARB)
/cygdrive/c/glew-1.11.0
$ cc -shared -Wl,--out-implib,lib/libGLEW.dll.a -o lib/cygGLEW--.dll tmp/cygwin/default/shared/glew.o -lopengl32 -lX11
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x34b): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x364): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x37d): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x396): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x3af): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x3c8): more undefined references to `glXGetProcAddressARB' follow
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x141c1): undefined reference to `glGetString'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x14220): undefined reference to `glXGetClientString'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x1426e): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x142b8): undefined reference to `glXQueryVersion'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x142e2): undefined reference to `glXGetClientString'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x14387): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x14939): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x14952): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x14988): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x149a1): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x149ba): more undefined references to `glXGetProcAddressARB' follow
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x164af): undefined reference to `glGetString'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x1674e): undefined reference to `glGetString'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x16795): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x167ae): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x167c7): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x167e0): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x16891): undefined reference to `glXGetProcAddressARB'
tmp/cygwin/default/shared/glew.o:glew.c:(.text+0x168aa): more undefined references to `glXGetProcAddressARB' follow
collect2: error: ld returned 1 exit status
任何想法如何讓glew編譯?