Building GLUI with VS2013 and MinGW in Windows

Note: The dynamic library option doesn’t work. Only static binding is available as of this writing.
One of the example programs given that come with GLUI

One of the example programs given that come with GLUI

This is assuming you’ve already downloaded the GLUI  source code (As of this writing it is v2.35), and you have glut installed.

Visual Studio

  1. open the *.sln file, let it migrate the project file.
  2. Ignore all the errors.
  3. build only the “_glui library” project. Build both debug and release versions. When you build the example programs, choose debug and release build configurations according to what build the glui library uses.
  4. install the library:
    • Header file (glui.h): C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\gl
    • lib file (glui32.lib): C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib
  5. Building the example programs from the root project itself won’t work. Start a new empty 32-bit console visual studio project and copy paste the example code to the main.cpp
  6. build and run. You don’t need to link any libraries.
MinGW and Codeblocks
I’m assuming you have MinGW in your environment paths (typing gcc in your command prompt returns ‘no input files’)
  1. The makefile provided is for linux. Use this makefile instead.
  2. open command prompt window in the src directory and run
    mingw32-make -f makefile

    (notice that the example programs are built as well)

  3. install the library:
    • Header file (glui.h): C:\MinGW\include\GL
    • lib file (libglui.a): C:\MinGW\lib
  4. In codeblocks, right click the project and select ‘build options…’
  5. Add the following in linker settings:
    Image
    (the order is important! glui must come first!)
  6. Remember to do this for both debug and release configurations.
  7. build and run. As it is statically binded, no *.dll dependency here.
And there you have it! Now, let’s be honest: not everyone wants to go through the trouble of building the library (I myself had spent a formidable amount of time figuring this out, as silly as I may sound). So to save you the trouble, I’ve precompiled the the GLUI (v2.35) library for you (VC++ 2013, MinGW 4.8.1)!
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s