- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在 Xubuntu 14.04 中使用 Code::Blocks 制作一个 OpenGL 应用程序,并从源代码安装了 GLFW3。在 eclipse CDT 中,它可以工作,但在此 IDE 中,编译时会出现一条错误消息:
[...]
/usr/include/GL/glext.h|1404|error: reference to ‘uint64_t’ is ambiguous|
/usr/include/stdint.h|55|note: candidates are: typedef long unsigned int uint64_t|
third_party/glm/fwd.hpp|907|note: typedef glm::detail::uint64 glm::uint64_t|
/usr/include/GL/glext.h|1404|error: ‘uint64_t’ does not name a type|
/usr/include/GL/glext.h|1405|error: reference to ‘int64_t’ is ambiguous|
/usr/include/x86_64-linux-gnu/sys/types.h|197|note: candidates are: typedef long int int64_t|
third_party/glm/fwd.hpp|305|note: typedef glm::detail::int64 glm::int64_t|
/usr/include/GL/glext.h|1405|error: ‘int64_t’ does not name a type|
/usr/include/GL/glext.h|1478|error: ‘GLuint64’ has not been declared|
/usr/include/GL/glext.h|1479|error: ‘GLuint64’ has not been declared|
/usr/include/GL/glext.h|1480|error: ‘GLint64’ has not been declared|
/usr/include/GL/glext.h|1482|error: ‘GLint64’ has not been declared|
/usr/include/GL/glext.h|1483|error: ‘GLint64’ has not been declared|
/usr/include/GL/glext.h|1547|error: ‘GLint64’ has not been declared|
/usr/include/GL/glext.h|1548|error: ‘GLuint64’ has not been declared|
/usr/include/GL/glext.h|2447|error: ‘GLint64’ has not been declared|
/usr/include/GL/glext.h|2591|error: reference to ‘uint64_t’ is ambiguous|
/usr/include/stdint.h|55|note: candidates are: typedef long unsigned int uint64_t|
third_party/glm/fwd.hpp|907|note: typedef glm::detail::uint64 glm::uint64_t|
/usr/include/GL/glext.h|2591|error: ‘uint64_t’ does not name a type|
/usr/include/GL/glext.h|2593|error: typedef ‘GLuint64’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|2593|error: ‘PFNGLGETTEXTUREHANDLEARBPROC’ was not declared in this scope|
/usr/include/GL/glext.h|2594|error: typedef ‘GLuint64’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|2594|error: ‘PFNGLGETTEXTURESAMPLERHANDLEARBPROC’ was not declared in this scope|
/usr/include/GL/glext.h|2595|error: typedef ‘PFNGLMAKETEXTUREHANDLERESIDENTARBPROC’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|2595|error: ‘GLuint64’ was not declared in this scope|
/usr/include/GL/glext.h|2596|error: typedef ‘PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|2596|error: ‘GLuint64’ was not declared in this scope|
/usr/include/GL/glext.h|2597|error: typedef ‘GLuint64’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|2597|error: ‘PFNGLGETIMAGEHANDLEARBPROC’ was not declared in this scope|
/usr/include/GL/glext.h|2598|error: typedef ‘PFNGLMAKEIMAGEHANDLERESIDENTARBPROC’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|2598|error: ‘GLuint64’ was not declared in this scope|
/usr/include/GL/glext.h|2598|error: expected primary-expression before ‘access’|
/usr/include/GL/glext.h|2599|error: typedef ‘PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|2599|error: ‘GLuint64’ was not declared in this scope|
/usr/include/GL/glext.h|2600|error: ‘GLuint64’ has not been declared|
/usr/include/GL/glext.h|2601|error: ‘GLuint64’ does not name a type|
/usr/include/GL/glext.h|2602|error: ‘GLuint64’ has not been declared|
/usr/include/GL/glext.h|2603|error: ‘GLuint64’ does not name a type|
/usr/include/GL/glext.h|2604|error: typedef ‘PFNGLISTEXTUREHANDLERESIDENTARBPROC’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|2604|error: ‘GLuint64’ was not declared in this scope|
/usr/include/GL/glext.h|2605|error: typedef ‘PFNGLISIMAGEHANDLERESIDENTARBPROC’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|2605|error: ‘GLuint64’ was not declared in this scope|
/usr/include/GL/glext.h|2606|error: ‘GLuint64EXT’ has not been declared|
/usr/include/GL/glext.h|2607|error: ‘GLuint64EXT’ does not name a type|
/usr/include/GL/glext.h|2608|error: ‘GLuint64EXT’ has not been declared|
/usr/include/GL/glext.h|7547|error: ‘GLint64’ has not been declared|
/usr/include/GL/glext.h|7548|error: ‘GLuint64’ has not been declared|
/usr/include/GL/glext.h|8235|error: typedef ‘GLuint64’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|8235|error: ‘PFNGLGETTEXTUREHANDLENVPROC’ was not declared in this scope|
/usr/include/GL/glext.h|8236|error: typedef ‘GLuint64’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|8236|error: ‘PFNGLGETTEXTURESAMPLERHANDLENVPROC’ was not declared in this scope|
/usr/include/GL/glext.h|8237|error: typedef ‘PFNGLMAKETEXTUREHANDLERESIDENTNVPROC’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|8237|error: ‘GLuint64’ was not declared in this scope|
/usr/include/GL/glext.h|8238|error: typedef ‘PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC’ is initialized (use decltype instead)|
/usr/include/GL/glext.h|8238|error: ‘GLuint64’ was not declared in this scope|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|
编译器为GNU GCC,代码为c++11。链接库按以下顺序排列:
X11
pthread
Xrandr
Xi
Xxf86vm
rt
m
GL
链接器搜索目录:
/usr/lib
/usr/local/lib
/usr/include *Tried in Compiler search directories too
/usr/local/include *Tried in Compiler search directories too
如果您还需要什么,尽管问。PD:我没有直接包含 GL header ,glfw3 帮我做了。
最佳答案
似乎,在您的代码(或 GLFW3 的代码)中,您有类似的内容:
using namespace glm::detail;
这会在您的命名空间中引入 uint64_t
的其他定义。如果要指定要使用的类型,可以删除 using namespace
或完全指定要使用的类型;它将是 ::uint64_t
或 glm::detail::uint64_t
。
另一种解决方案是尝试更改包含文件的顺序。
关于c++ - 代码:: block linux glext.h "reference to uint64_t is ambiguous",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25581143/
我正在使用 eclipse 创建一个原生 android 项目。它使用 opengl es 1.1。 我在使用“glext.h”中定义的函数时遇到问题。我可以使用“glext.h”中定义的宏,但是当我
当我发现 something that now has me scared to use glext.h 时,我正在浏览 OS X Lion 上的 OpenGL 更新。 . 所以,这是错误。 Lion
所以我试图将一个使用 Qt 和 OpenGL 在 Linux 机器上编写和编译的 c++ 项目带到我家里的 Windows 7 机器上,但我遇到了一些困难。首先,我了解到一些 gl 东西(如 GL_T
我正在尝试使用 glew.h 和 glext.h 编译一些代码。这是一个最小的例子: #include //#include // commenting it doesn't change any
我有这个简单的代码 #include #include #include int main (int argc, const char * argv[]) { prin
我正在 Xubuntu 14.04 中使用 Code::Blocks 制作一个 OpenGL 应用程序,并从源代码安装了 GLFW3。在 eclipse CDT 中,它可以工作,但在此 IDE 中,编
我是一名优秀的程序员,十分优秀!