Author Topic: Specifying order of GLUI - GLUT - OpenGL libraries  (Read 4439 times)

Offline xnhcoder

  • Single posting newcomer
  • *
  • Posts: 9
  • Okay, but I'm dancing on the inside.
Specifying order of GLUI - GLUT - OpenGL libraries
« on: December 31, 2005, 11:00:52 pm »
The manual for GLUI version 2 specifies, "The proper order in which to add libraries is: GLUI, GLUT, GLU, OpenGL."

It is important to keep this order in mind when configuring C::B, especially when multiple versions of a library (w/ different header files) may exist in multiple locations, e.g., /mingw/lib/libglut32.a and /msys/1.0/local/lib/libglut32.a. 

In C::B, the location and order of libraries may be specified in two ways:

1. Explicitly in "Compiler Settings"->Linker->"Link libraries" or

2. Implicitly through "Compiler Settings"->Linker->"Other linker options" and "Compiler Settings"->Directories->Linker.  (If I recall correctly, this is how Dev-C++ does it.)

I recommend, when multiple versions of a library exist in multiple locations and the order in which libraries are called is important, that the location and order of the libraries be specified explicitly.

I'm new to C::B, and, I think, I'll be making the move from Dev-C++.  At first, I thought having two ways to specify libraries was unnecessary (and confusing).  But, now, after struggling for half a day to successfully rebuild the GLUI sample problems with C::B, I see the value of the implicit and explicit approaches.

I haven't check this, but I would expect that the explicit order of libraries would take precedence over the implicit order.

Happy New Year!!