我下载了GLUI 2.36,并开始在VS 2017,Windows 10中构建Visual Studio项目。在正确安装了GLUT库之后,我仍然得到以下编译时错误:
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在大多数源文件上也是如此。
对此最好的解决方案是什么?或者我可以从其他地方下载更新的版本?
发布于 2019-02-08 10:28:24
2.36来自2007。2.37 (最新版本)在2015中进行了标记。
你的问题听起来像是fixed in 2015,并将其添加到2.37中:
使用模板类实例化修复MSVC问题
实例化模板类。
https://stackoverflow.com/questions/54584636
复制相似问题