OpenGL Resources

Updated on Jan 6  2018


OpenGL,Freeglut,MinGW

Deborah R. Fowler



Using OpenGL in MinGW with Freeglut

Posted Oct 7  2015
Updated Jan 5  2018
Updated June 26  2019
Updated Oct 1  2019 dll entry point problem
Updated April 16  2021
Updated April 28  2022

Currently in Monty we do not have MinGW set up on Windows, however it is simple to install on your home computer (tested Windows 10 on 12/01/2017 and again 01/05/2018 and again 06/26/2019 and again 04/16/2021 and again on Windows 11 on 04/28/2022)


If you do not have freeglut already installed:

Use the cmd window with the appropriate flags:
ie. g++ -o test OpenGL_Step1_Window.cpp -I"C:\MinGW\freeglut\include" -L"C:\MinGW\freeglut\lib" -lfreeglut -lopengl32

then type test.exe to run the program

Alternatively you could use a make file.

If you would like a sample test file and make file click here. (tested on 01/05/2018 with fresh Windows 10 and MinGW install)

(The sample makefile above will run in geany if you change the build command from make to mingw32-make and have MinGW installed - tested 06/26/2019)
You can also use geany with the commands changed.



NOTE: 10/01/2019 needed the additional compiler flag -static-libstdc++ or copy the libstd++6.dll into your folder to run
(was not required on my desktop 04/16/2021 and is currently not required on my desktop 04/28/2022)
https://stackoverflow.com/questions/38554987/mingw-boost-and-runtime-procedure-entry-point-could-not-be-located