0

I downloaded GLUI 2.36 and set out to build the Visual Studio project in VS 2017, Windows 10. After getting the GLUT libraries correctly installed, I still get the following compile-time errors:

1>glui.cpp
1>c:\install\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

And likewise on most of the source files.

What is the best resolution for this? Or can I download a more up-to-date version somewhere?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Joymaker
  • 813
  • 1
  • 9
  • 23

1 Answers1

0

2.36 is from 2007. 2.37 (the latest release) was tagged in 2015.

Your issue sounds like it was fixed in 2015, and made it into 2.37:

fix MSVC problem with template class instantiation

  • error C2252 informs that the microsoft compiler wants template classes to be instantiated at namespace scope
genpfault
  • 51,148
  • 11
  • 85
  • 139