- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试按照此处所示的 OpenGL 3D 教程进行操作: http://www.arcsynthesis.org/gltut/index.html
我已经按照为构建教程编写的说明进行操作,但是当我在使用 premake 函数后使用 MinGW 的 msys 程序在 OpenGL SDK 目录中键入 make config=debug 时,出现一个编译器错误,显示“inttypes. h: 没有这样的文件或目录。”
In file included from include/glload/gl_all.hpp:9,
from source/gl_load_cpp.cpp:4:
include/glload/_int_gl_exts.hpp:731: error: integer constant is too large for "l
ong" type
include/glload/_int_gl_exts.hpp:4322: error: <code>GLuint64' has not been declared
include/glload/_int_gl_exts.hpp:4322: error: ISO C++ forbids declaration of</code>tim
eout' with no type
include/glload/_int_gl_exts.hpp:4328: error: <code>GLuint64' has not been declared
include/glload/_int_gl_exts.hpp:4328: error: ISO C++ forbids declaration of</code>tim
eout' with no type
include/glload/_int_gl_exts.hpp:4355: error: <code>GLuint64' has not been declared
include/glload/_int_gl_exts.hpp:4355: error: ISO C++ forbids declaration of</code>par
ams' with no type
include/glload/_int_gl_exts.hpp:5273: error: ISO C++ forbids declaration of <code>GLu
int64' with no type
include/glload/_int_gl_exts.hpp:5273: error: typedef</code>gl::_detail::GLuint64' is
initialized (use <strong>typeof</strong> instead)
include/glload/_int_gl_exts.hpp:5273: error: <code>Proc_glGetImageHandleARB' was not
declared in this scope
include/glload/_int_gl_exts.hpp:5273: error: expected</code>,' or <code>;' before '(' toke
n
include/glload/_int_gl_exts.hpp:5276: error:</code>GLuint64EXT' has not been declared<p></p>
include/glload/_int_gl_exts.hpp:5276: error: ISO C++ forbids declaration of `par
ams' with no type
include/glload/_int_gl_exts.hpp:5287: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:5287: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:5288: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:5288: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:5291: error: expected init-declarator before "Ge
tImageHandleARB"
include/glload/_int_gl_exts.hpp:5291: error: expected `,' or `;' before "GetImag
eHandleARB"
include/glload/_int_gl_exts.hpp:7879: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7879: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:7880: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:7880: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:7883: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7883: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7883: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:7883: error: ISO C++ forbids declaration of `y'
with no type
include/glload/_int_gl_exts.hpp:7884: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:7884: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:7887: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7887: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7887: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7887: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:7887: error: ISO C++ forbids declaration of `y'
with no type
include/glload/_int_gl_exts.hpp:7887: error: ISO C++ forbids declaration of `z'
with no type
include/glload/_int_gl_exts.hpp:7888: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:7888: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:7891: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7891: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7891: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7891: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7891: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:7891: error: ISO C++ forbids declaration of `y'
with no type
include/glload/_int_gl_exts.hpp:7891: error: ISO C++ forbids declaration of `z'
with no type
include/glload/_int_gl_exts.hpp:7891: error: ISO C++ forbids declaration of `w'
with no type
include/glload/_int_gl_exts.hpp:7892: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:7892: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:7895: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7895: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:7896: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:7896: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:7899: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7899: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7899: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:7899: error: ISO C++ forbids declaration of `y'
with no type
include/glload/_int_gl_exts.hpp:7900: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:7900: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:7903: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7903: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7903: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7903: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:7903: error: ISO C++ forbids declaration of `y'
with no type
include/glload/_int_gl_exts.hpp:7903: error: ISO C++ forbids declaration of `z'
with no type
include/glload/_int_gl_exts.hpp:7904: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:7904: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:7907: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7907: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7907: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7907: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:7907: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:7907: error: ISO C++ forbids declaration of `y'
with no type
include/glload/_int_gl_exts.hpp:7907: error: ISO C++ forbids declaration of `z'
with no type
include/glload/_int_gl_exts.hpp:7907: error: ISO C++ forbids declaration of `w'
with no type
include/glload/_int_gl_exts.hpp:7908: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:7908: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:8197: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8197: error: ISO C++ forbids declaration of `par
ams' with no type
include/glload/_int_gl_exts.hpp:8199: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8199: error: ISO C++ forbids declaration of `min
PresentTime' with no type
include/glload/_int_gl_exts.hpp:8200: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8200: error: ISO C++ forbids declaration of `min
PresentTime' with no type
include/glload/_int_gl_exts.hpp:8261: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8261: error: ISO C++ forbids declaration of `par
ams' with no type
include/glload/_int_gl_exts.hpp:8262: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8262: error: ISO C++ forbids declaration of `res
ult' with no type
include/glload/_int_gl_exts.hpp:8263: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8263: error: ISO C++ forbids declaration of `par
ams' with no type
include/glload/_int_gl_exts.hpp:8264: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8264: error: ISO C++ forbids declaration of `par
ams' with no type
include/glload/_int_gl_exts.hpp:8271: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8271: error: ISO C++ forbids declaration of `val
ue' with no type
include/glload/_int_gl_exts.hpp:8272: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:8272: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:8273: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8273: error: ISO C++ forbids declaration of `val
ue' with no type
include/glload/_int_gl_exts.hpp:8274: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:8274: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:8401: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8401: error: ISO C++ forbids declaration of `par
ams' with no type
include/glload/_int_gl_exts.hpp:8404: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8404: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:8405: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:8405: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:8408: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8408: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8408: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:8408: error: ISO C++ forbids declaration of `y'
with no type
include/glload/_int_gl_exts.hpp:8409: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:8409: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:8412: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8412: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8412: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8412: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:8412: error: ISO C++ forbids declaration of `y'
with no type
include/glload/_int_gl_exts.hpp:8412: error: ISO C++ forbids declaration of `z'
with no type
include/glload/_int_gl_exts.hpp:8413: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:8413: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:8416: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8416: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8416: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8416: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8416: error: ISO C++ forbids declaration of `x'
with no type
include/glload/_int_gl_exts.hpp:8416: error: ISO C++ forbids declaration of `y'
with no type
include/glload/_int_gl_exts.hpp:8416: error: ISO C++ forbids declaration of `z'
with no type
include/glload/_int_gl_exts.hpp:8416: error: ISO C++ forbids declaration of `w'
with no type
include/glload/_int_gl_exts.hpp:8417: error: expected `,' or `...' before '*' to
ken
include/glload/_int_gl_exts.hpp:8417: error: ISO C++ forbids declaration of `GLu
int64EXT' with no type
include/glload/_int_gl_exts.hpp:8443: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8443: error: ISO C++ forbids declaration of `add
ress' with no type
include/glload/_int_gl_exts.hpp:8447: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8447: error: ISO C++ forbids declaration of `res
ult' with no type
include/glload/_int_gl_exts.hpp:8664: error: `GLuint64EXT' has not been declared
include/glload/_int_gl_exts.hpp:8664: error: ISO C++ forbids declaration of `cap
ture_time' with no type
source/gl_load_cpp.cpp:879: error: expected init-declarator before "_funcptr_glG
etImageHandleARB"
source/gl_load_cpp.cpp:879: error: expected `,' or `;' before "_funcptr_glGetIma
geHandleARB"
source/gl_load_cpp.cpp:4342: error: expected constructor, destructor, or type co
nversion before "GetImageHandleARB"
source/gl_load_cpp.cpp:4342: error: expected `,' or `;' before "GetImageHandleAR
B"
source/gl_load_cpp.cpp: In function `void gl::CopyFunctionPointers()':
source/gl_load_cpp.cpp:7624: error: `GetImageHandleARB' undeclared (first use th
is function)
source/gl_load_cpp.cpp:7624: error: (Each undeclared identifier is reported only
once for each function it appears in.)
source/gl_load_cpp.cpp:7624: error: `_funcptr_glGetImageHandleARB' undeclared (f
irst use this function)
make: *** [Debug/gl_load_cpp.o] Error 1
</code></pre>
我目前正在使用 MinGW 来编译它,我必须同时使用 Windows 命令提示符和 MSYS 才能让它工作。
最佳答案
使用更新版本,在此处下载其中一个软件包:
无论你使用什么东西来编译(makefile、cmake、任何 IDE),你都必须让它知道 C/C++ 编译器在哪里。
我通过使用脚本设置环境变量(这比看起来更容易)来做到这一点,这样您就不会污染“全局环境”:
这是允许您使用命令行命令(如“g++ -bla”)的批处理文件
set "PATH=D:/MinGWBuilds/mingw32/bin;C:/Windows/System32;"
set "CC=D:/MinGWBuilds/mingw32/bin/gcc"
set "CXX=D:/MinGWBuilds/mingw32/bin/g++"
set DXSDK_DIR="D:/MinGWBuilds/mingw32/i686-w64-mingw32/include/ddkv"
cd /d "%~dp0"
cmd.exe
你只需要从控制台启动你的ide(很容易做到,而不是调用“cmd.exe”你也可以调用“CodeBlocks.exe”或任何其他Ide/文本编辑器/脚本运行器,你只需要将其路径添加到 PATH)。
当然,您必须为自己添加缺少程序(如 python/lua 解释器等)的路径。不要怪我使用 Env 变量和命令提示符,一旦您获得包含所有内容的脚本,它真的会让您的生活更轻松你需要。在示例中,我将它与 CMake 结合使用来完成几乎所有事情(使用各种编译器版本对 Win、Mac、Linux、Android 等进行交叉编译,因为我维护了一个库,我还在开发时生成 VS 项目文件,因此我可以使用很好的完成功能VS 在为 Linux 编译时也是如此 :D)
请注意,我不再使用 MSYS 或 MSYS2。我只使用 Cmake 生成的 makefile。和 mingw32/bin
文件夹中的 make 可执行文件 (mingw32-make.exe)
哦,请记住,您需要使用以下编译标志启用 c++11
-std=c++11
之后你可以自由地包含cinttypes
。
关于c++ - MinGW 找不到 inttypes.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27759901/
例如,我有一个父类Author: class Author { String name static hasMany = [ fiction: Book,
代码如下: dojo.query(subNav.navClass).forEach(function(node, index, arr){ if(dojo.style(node, 'd
我有一个带有 Id 和姓名的学生表和一个带有 Id 和 friend Id 的 Friends 表。我想加入这两个表并找到学生的 friend 。 例如,Ashley 的 friend 是 Saman
我通过互联网浏览,但仍未找到问题的答案。应该很容易: class Parent { String name Child child } 当我有一个 child 对象时,如何获得它的 paren
我正在尝试创建一个以 Firebase 作为我的后端的社交应用。现在我正面临如何(在哪里?)找到 friend 功能的问题。 我有每个用户的邮件地址。 我可以访问用户的电话也预订。 在传统的后端中,我
我主要想澄清以下几点: 1。有人告诉我,在 iOS 5 及以下版本中,如果您使用 Game Center 设置多人游戏,则“查找 Facebook 好友”(如与好友争夺战)的功能不是内置的,因此您需要
关于redis docker镜像ENTRYPOINT脚本 docker-entrypoint.sh : #!/bin/sh set -e # first arg is `-f` or `--some-
我是一名优秀的程序员,十分优秀!