2. Extract the zip file, and open the src/msvc/glui.sln file in vc++
3. Select the _glui library and build the library.
4. After building the library, the lib file (glui32d.lib), glui32d.lib – ‘d’ for debug, will be stored in the msvc\lib directory.
5. Put the glui32d.lib file into
C:\Program Files\Microsoft Visual Studio 10.0\VC\lib
directory and rename to glui32.lib6. Put the glui.h file into
C:\Program Files\Microsoft Visual Studio 10.0\VC\include
directory.7. Create new project and try to compile. That's all.
Note : For VS 2010 users, the error below may be generated when compiling the library.
1 | error C2252: an explicit instantiation of a template can only occur at namespace scope |
Try this,
- Cut the corresponding block code and paste outside the class GLUIAPI GLUI_CommandLine definition
1
#ifdef _MSC_VER
2
// Explicit template instantiation needed for dll
3
template
class
GLUIAPI std::allocator<GLUI_String>;
4
template
class
GLUIAPI std::vector<GLUI_String,
5
std::allocator<GLUI_String> >;
6
#endif
- Put #include <iterator> after #include <cstdlib>
1
#include <cstdlib>
2
#include <iterator>
- Build it as usual