Freeglut Binary
freeglut is an open-source GLUT (OpenGL Utility Toolkit) library, and is used to develop cross-platform OpenGL applications. The source code is available at freeglut project page.
Freeglut Binary for MinGW (g++)
This package contains pre-compiled freeglut libraries for 32-bit and 64-bit MinGW on Windows.
- libfreeglut.dll: Shared dynamic link libraries under freeglut/bin folder
- libfreeglut.dll.a: Shared libraries under freeglut/lib folder
- libfreeglut_static.a: Static libraries under freeglut/lib folder
- Header files under freeglut/include folder
Download:
(SHA256 Hash: 1751b80d763f34b9a9768358f9149294fda2937c1a7b841e34a3294bb87aaf9b)
Usage
For 64-bit MinGW, link with the shared library under freeglut/lib/x64 directory. Define FREEGLUT_STATIC macro if you want to link it statically.
// dynamic link for 64-bit
g++.exe -I./freeglut/include ... // compile
g++.exe -L./freeglut/lib/x64 -lfreeglut -lopengl32 ... // link
// static link for 64-bit
g++.exe -DFREEGLUT_STATIC -I./freeglut/include ... // compile
g++.exe -L./freeglut/lib/x64 -lfreeglut_static -lopengl32 ... // link
For 32-bit MinGW, compile with -m32 option and link with the shared library under freeglut/lib directory.
// dynamic link for 32-bit
g++.exe -m32 -I./freeglut/include ... // compile
g++.exe -m32 -L./freeglut/lib -lfreeglut -lopengl32 ... // link
// static link for 32-bit
g++.exe -m32 -DFREEGLUT_STATIC -I./freeglut/include ... // compile
g++.exe -m32 -L./freeglut/lib -lfreeglut_static -lopengl32 ... // link
Code::Blocks Project Settings
To build an OpenGL application statically linking freeglut in Code::Blocks project, go to Project > Build options... dialog. Then, specify the directories of your freeglut and define FREEGLUT_STATIC macro and link with freeglut_static library. If you want to dynamic link freeglut, specify freeglut library only.
Freeglut Binary for MS VisualStudio (VC++)
This package contains pre-compiled 64-bit/32-bit freeglut libraries for MS VisualStudio (VC++). The 64-bit versions are stored under x64 sub-directory.
- freeglut.dll: Shared dynamic link libraries (Release) under freeglut/bin folder
- freeglutd.dll: Shared dynamic link libraries (Debug) under freeglut/bin folder
- freeglut.lib: Shared libraries (Release) under freeglut/lib folder
- freeglutd.lib: Shared libraries (Debug) under freeglut/lib folder
- freeglut_static.lib: Static libraries (Release) under freeglut/lib folder
- freeglut_staticd.lib: Static libraries (Debug) under freeglut/lib folder
- Header files under freeglut/include folder
Download:
(SHA256 Hash: a4ae51743f3dc08e065b121992a3515c02456e394eea6114c48aae29283963d0)
Usage
For 64-bit platform, link with freeglut.lib or freeglutd.lib under freeglut/lib/x64 directory. Define FREEGLUT_STATIC macro if you want to link it statically. VisualStudio will automatically switch freeglut.lib or freeglutd.lib depending on release or debug configuration.
For 32-bit build, compile with the shared libraries under freeglut/lib directory instead.
MS VisualStudio Project Settings
Copy the freeglut folder to the VS solution directory first. To build an OpenGL application statically linking freeglut in VisualStudio project, open the project property page. Then, specify the directories of your freeglut and define FREEGLUT_STATIC macro and link with freeglut_static.lib library. If you want linking freeglut dynamically, specify freeglut.lib library only.
(追記) (追記ここまで)