views:

58

answers:

1

I've got an OpenGL project for a class I'm in, and it's based on GLUI. The provided GLUI library won't work which is why I'm trying to compile it myself. So, I downloaded the source code from SourceForge and try to compile the _glui library. It gives me this, and I can't find any information on it:

1>ClCompile:
1>  algebra3.cpp
1>  arcball.cpp
1>  glui.cpp
1>c:\users\jake\downloads\glui-2.36\glui-2.36\src\include\gl\glui.h(1718): error C2252: an explicit instantiation of a template can only occur at namespace scope
1>c:\users\jake\downloads\glui-2.36\glui-2.36\src\include\gl\glui.h(1719): error C2252: an explicit instantiation of a template can only occur at namespace scope
1>  glui_add_controls.cpp
1>c:\users\jake\downloads\glui-2.36\glui-2.36\src\include\gl\glui.h(1718): error C2252: an explicit instantiation of a template can only occur at namespace scope
1>c:\users\jake\downloads\glui-2.36\glui-2.36\src\include\gl\glui.h(1719): error C2252: an explicit instantiation of a template can only occur at namespace scope
1>  glui_bitmap_img_data.cpp
1>  glui_bitmaps.cpp
1>c:\users\jake\downloads\glui-2.36\glui-2.36\src\include\gl\glui.h(1718): error C2252: an explicit instantiation of a template can only occur at namespace scope
1>c:\users\jake\downloads\glui-2.36\glui-2.36\src\include\gl\glui.h(1719): error C2252: an explicit instantiation of a template can only occur at namespace scope
1>  glui_button.cpp
1>c:\users\jake\downloads\glui-2.36\glui-2.36\src\include\gl\glui.h(1718): error C2252: an explicit instantiation of a template can only occur at namespace scope
1>c:\users\jake\downloads\glui-2.36\glui-2.36\src\include\gl\glui.h(1719): error C2252: an explicit instantiation of a template can only occur at namespace scope
1>  glui_checkbox.cpp
1>c:\users\jake\downloads\glui-2.36\glui-2.36\src\include\gl\glui.h(1718): error C2252: an explicit instantiation of a template can only occur at namespace scope
1>c:\users\jake\downloads\glui-2.36\glui-2.36\src\include\gl\glui.h(1719): error C2252: an explicit instantiation of a template can only occur at namespace scope
1>  glui_column.cpp

etc, etc etc

I look at the glui.h source file, and lines 1718 and 1719 have this:

#ifdef _MSC_VER
// Explicit template instantiation needed for dll
template class GLUIAPI std::allocator<GLUI_String>;
template class GLUIAPI std::vector<GLUI_String, std::allocator<GLUI_String> >;
#endif

Anyone seen this before?

A: 

If anyone has more info, I'd be glad to hear it, but I found that commenting out the section in glui.h allows it to compile. Now we'll find out if the compiled library actually works....

JakeVA