【问题标题】:C2252 error when building GLUI with VS2017?使用 VS2017 构建 GLUI 时出现 C2252 错误?
【发布时间】:2019-02-08 00:54:05
【问题描述】:

我下载了 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

大多数源文件也是如此。

什么是最好的解决方案?或者我可以在某处下载更新的版本吗?

【问题讨论】:

    标签: c++ opengl visual-studio-2017 glut glui


    【解决方案1】:

    2.36 来自2007。 2.37(最新版本)被标记在2015

    您的问题听起来像是fixed in 2015,并进入了 2.37:

    修复模板类实例化的 MSVC 问题

    • 错误 C2252 告知 microsoft 编译器希望在命名空间范围内实例化模板类

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-16
      • 2018-05-04
      • 2018-01-22
      • 1970-01-01
      • 1970-01-01
      • 2018-08-13
      • 2017-03-22
      • 1970-01-01
      相关资源
      最近更新 更多