"O_RDONLY"、"F_SETFL"'O_NONBLOCK'遵循 OpenGL 教程时未声明的错误
'O_RDONLY', `F_SETFL`, 'O_NONBLOCK' undeclared errors while following OpenGL tutorial
我目前正在以下网站学习现代OpenGl:http://www.arcsynthesis.org/gltut/Building%20the%20Tutorials.html.
不幸的是,当我按照说明构建代码示例时,我失败了。
这就是发生的事情:
1-我在glsdk目录中运行premake4代码块。
2-我在代码块中打开glsdk.workspace。
3-我进入构建->构建工作区。
4-我得到错误:
/home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c In function ‘fghJoystickOpen’:|
/home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c|1430|error: ‘O_RDONLY’ undeclared (first use in this function)|
/home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c|1430|note: each undeclared identifier is reported only once for each function it appears in|
/home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c|1448|error: ‘F_SETFL’ undeclared (first use in this function)|
/home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c|1448|error: ‘O_NONBLOCK’ undeclared (first use in this function)|
/home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c||In function ‘fghJoystickInit’:|
/home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c|1597|error: ‘F_OK’ undeclared (first use in this function)|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
||=== Build: Debug in glload (compiler: GNU GCC Compiler) ===|
||=== Build: Debug in glimg (compiler: GNU GCC Compiler) ===|
||=== Build: Debug in freeglut (compiler: GNU GCC Compiler) ===|
我目前正在运行Ubuntu 14.04。帮我解决这个问题。
我终于实现了这一点,我所做的是使用gmake平台,然后转到生成的*.make文件,在以LIBS开头的行末尾添加了-lx11,用于调试和发布选项。最后,只需运行makeconfig=debug和config=release即可获得可执行文件。此外,如果您有多个*.make文件,请将-lX11添加到所有文件中。
相关文章:
- #ifdef和未声明的标识符
- 未声明的标识符编译暗黑破坏神 2 程序"muleview"
- 在顶点着色器中使用 OpenGl 的未声明标识符,我在顶点着色器中绘制三角形时遇到问题
- Google protobuf 时间戳未声明标识符,在 Windows 上具有C++
- 在气泡排序程序中未声明错误功能
- 我在范围内未声明的错误类有问题
- 使用未声明的标识符"sqrt"?
- 我包含了<winuser.h>,但编译器在MonitorFromWindow上抛出"未声明"
- 对类 (C++) 中的私有变量使用未声明的标识符
- 我的代码中有错误,未声明的标识符
- 未定义的标识符/未声明
- 错误:在 C++ 'std'使用未声明的标识符
- 在编译器之前检测未声明的标识符
- 使用未声明的标识符'temp'
- 使用未声明的标识符"yylex"和"yyin"?
- 使用"class"关键字,后跟未声明的标识符
- 未声明的标识符错误,但变量定义正确 (?)
- C2065 'cout':未声明的标识符
- 在此范围内未声明错误"Clreol"
- "O_RDONLY"、"F_SETFL"'O_NONBLOCK'遵循 OpenGL 教程时未声明的错误