I downloaded GLFW 3.1.1 and followed a tutorial telling me to:
- Drop glfw3.h into MinGW's include folder
- Drop the contents of lib-mingw in the downloaded file into MinGW's lib folder
- Run the test program that comes with GLFW
After doing this I kept running into an error that stopped me from even starting a new GLFW project as the wizard kept looking for glfw.h
and glfw.dll
when they're now glfw3.h
and glf3.dll
I edited the wizard and was finally able to get the new project open.
After that, I clicked build and run and the compiler asked if I was sure. When I clicked yes it continually asked me if I wanted to build and run. The debugger just gives me this and I'm not sure what I set up wrong.
-------------- Build: Debug in 112311 (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -g -I"C:\Program Files\MinGW\include" -c "C:\Users\User\Desktop\Folders\C++ Files\112311\main.cpp" -o obj\Debug\main.o
Execution of 'mingw32-g++.exe -Wall -g -I"C:\Program Files\MinGW\include" -c "C:\Users\User\Desktop\Folders\C++ Files\112311\main.cpp" -o obj\Debug\main.o' in 'C:\Users\User\Desktop\Folders\C++ Files\112311' failed.
-------------- Run: Debug in 112311 (compiler: GNU GCC Compiler)---------------
Checking for existence: C:\Users\User\Desktop\Folders\C++ Files\112311\bin\Debug\112311.exe
i
You should avoid using the wizard for GLFW projects because it's for an outdated version of GLFW.
You should create a console application then go to
Project->Build Options
. Go to theLinker settings
tab then addglfw3
,opengl32
andgdi32
, then click OK.You can now test if it worked by copying the sample code on the GLFW website's documentation page and pasting it in main.cpp, replacing everything and running the program.