Hi,i write a simple program under windows showing a rectangle and i compile it with MinGw using the command line (I know IDE are better but just want to do it the old way) and this is the command line:
g++ main.cpp -L"lib" -lglfw3dll -lglew32dll
but the function glDrawArrays() still undefined and i dont know what library should i link to it or what i forget ?
[QUOTE=mounir;1285964]Hi,i write a simple program under windows showing a rectangle and i compile it with MinGw using the command line (I know IDE are better but just want to do it the old way) and this is the command line:
g++ main.cpp -L"lib" -lglfw3dll -lglew32dll
but the function glDrawArrays() still undefined and i dont know what library should i link to it or what i forget ?[/QUOTE]
Try to add “-lGL” also. This is where “common” OpenGL function symbols are defined.
The linker cannot find that library and i cant find it i seek my hole computer looking for libgl or something like that i just cant find it. please help it’s my final step to start learn opengl? should i download it? compile it? where can i find it?
Ok, yeah, I just searched, and there are two files opengl32.dll, and opengl32.lib. So one is a library file you can link to, and another is dynamic link library, you can load and call functions from.