Reputation: 1526
I am trying to wite OpenGL on MSYS2. I installed mingw-w64 packages like SDL2, glew, glm, mesa etc. But when I try to compile something like;
gcc main.c -o main -lSDL2 -lGLEW -lGLU -lGL
This is how I compiled things on Linux so i thought it would be similar. but -lGL is giving me problems. I can't find any OpenGL library for MSYS2. I installed mesa as i said but no luck. Should I use Windows version coming with driver and link to that? I don't know how can I do this though.
I copied OpenGL32.dll and lib files from my Windows to mingw64/lib folder and renamed them to libGL but of course this did not work.
Upvotes: 3
Views: 4993
Reputation: 96286
If I remember correctly, on Windows these libraries are called differently.
Try -lglew32 -lglu32 -lopengl32
.
Upvotes: 7