0

Possible Duplicate:
Building glew on windows with mingw

I'm trying to study some C++ with SDL and OpenGL. As binding for OpenGL i've chosen GLEW, which i finally got to compile...well until i'm going to use bindings newer than OpenGL 1.1. The glew headers are included, right before SDL, i'm not using SDL's at all, compiling using Code::Blocks with mingw. The glew32.lib is linked, also the opengl32 and glu32 lib. As soon as i use glGenBuffers (from OpenGL 1.5 afaik) i get the following error from the linker:

undefined reference to _imp____glewGenBuffers

I checked out the glewinfo.exe tool in my download, which tells me that OpenGL 1.5 is successfully included, but he can't find it for some reason.

I googled nearly all the day for this problem, compiled glew again (downloaded MS VC only for this) and still no result. What I'm doing wrong?

Community
  • 1
  • 1
Jean
  • 165
  • 2
  • 13
  • The first google result for that error message tells you the problem: http://stackoverflow.com/a/8872234/560648 - .lib is for MSVS. – Lightness Races in Orbit Jan 15 '13 at 17:27
  • i see, that means i cannot use this because of the C++/CLI stuff i've read about? Bare with me, im using C++ not for a week so far. So can i compile glew using mingw? well, i gonna take a look at google again. thanks so far! – Jean Jan 15 '13 at 17:32
  • C++/CLI has nothing to do with it. Use the existing GLEW packages for MinGW and, I'd imagine, build `dll`s to use. Read GLEW's instructions for using it with MinGW. – Lightness Races in Orbit Jan 15 '13 at 17:35
  • i'm an idiot. whoever come's across here like i did, to compile glew for mingw, here you should find the answers: http://stackoverflow.com/questions/6005076/building-glew-on-windows-with-mingw – Jean Jan 15 '13 at 17:36
  • You shouldn't need to build it at all IIRC. I don't remember ever having to. Maybe I just found a pre-built binary somewhere. – Lightness Races in Orbit Jan 15 '13 at 17:46
  • 1
    Well, the only prebuilts i've found on glew were compiled for VC as you said. but the link in my last comment helped me alot. The compile commands in anons answer on this question working like a charm – Jean Jan 15 '13 at 18:06
  • Sounds like that's the answer to this question then – Lightness Races in Orbit Jan 15 '13 at 18:08

0 Answers0