I'm having some trouble getting glew to work on my C++ project. I am using Windows 10 with g++ version "g++ (MinGW.org GCC-6.3.0-1) 6.3.0". I copied the 64-bit .lib files to my lib folder, however when I attempt to run the project it gives me the following error:
g++ -g -Wall -I includes main.cpp MainGame.cpp -o main -L lib -lmingw32 -lSDL2main -lSDL2 -lopengl32 -lglew32 C:\Users\*****\AppData\Local\Temp\ccTyS9Bz.o: In function `ZN8MainGame11initSystemsEv': C:\Users\*****\Documents\***********\**********/MainGame.cpp:46: undefined reference to `_imp__glewInit@0' collect2.exe: error: ld returned 1 exit status
On the other hand, I tried copying the 32-bit lib files into my lib folder instead, and g++ compiles the project with no problem. However when I try to actually run the project I get a pop-up window with the error:
The application was unable to start correctly (0xc000007b). Click OK to close the application.
I received this error previously working with a different library, and it was because I was using a 32-bit lib file instead of a 64-bit lib file, so I'm assuming that this is the case this time as well.
So it seems like either I use the 64-bit glew, and it won't compile or the 32-bit glew and it compiles but won't run. So I'm really not sure what to do. I copied the 32-bit and 64-bit .dll files into the System32 and SysWOW64 folders, respectively, so I'm really not sure why the 64-bit version won't compile. Any help would be greatly appreciated, thank you very much.
User contributions licensed under CC BY-SA 3.0