gpt4 book ai didi

opengl - Qt 5.0.1 + Visual Studio 2012 + OpenGL

转载 作者:行者123 更新时间:2023-12-02 05:01:16 25 4
gpt4 key购买 nike

我正在尝试将我的 Qt4 项目转换为 Qt5。它使用 OpenGL,在 2008/Qt4.8.4 上运行良好。请注意,我正在重新输入列出的错误,而不是复制粘贴。

  • 我已经使用“-opengl desktop”标志重新编译了 Qt 5.0.1(成功)
  • 安装了 Visual Studio 2012 插件

编译代码时出现以下错误:

1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\GL/gl.h(60): error C2371:
'GLdouble' : redefinition; different basic types
1> c:\qt\qt-everywhere-opensource-src-
5.0.1\qtbase\include\qtgui\../../src/gui/opengl/qopengl.h(71)
: see declaration of 'GLdouble'

如果我替换 #include <GL/gl.h>#include <qopengl.h>我明白了

GL_PROJECTION macro not found

错误等等。由于 -opengl 桌面标志,我“不应该”使用 OpenGL ES。

最佳答案

Qt 5.0.1 不支持(甚至重新编译)桌面 OpenGL。已使用 Qt 5.0.2 或更高版本重建。

关于opengl - Qt 5.0.1 + Visual Studio 2012 + OpenGL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16110134/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com