Freeglut Binary

←Back
 

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

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:

freeglut-mingw-3.6.0.zip

(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.

codeblocks settings
FREEGLUT_STATIC macro in Compiler settings > #defines

codeblocks settings
freeglut_static or freeglut in Linker settings > Link libraries:

codeblocks settings
freeglut\include in Search directories > Compiler

codeblocks settings
freeglut\lib\x64 or freeglut\lib in Search directories > Linker

←Back
 
 
Hide Comments
comments powered by Disqus