XWindow + OpenGL,无法编译文件
XWindow + OpenGL, cant compile files
我想编译我的OpenGL + Xwindow C++程序,但是我收到错误:
g++: fatal error: no input files
compliation terminated.
./source/Linux_OpenGL.c: line 10: //: is catalogue
...typedef: command not found
...Bool command not found
...XSetWindowAttributes command not found
...Syntax error near '}'.
等等...
这是我的编译脚本:
$(g++ -Wall -pedantic -ansi) ./source/Linux_OpenGL.cpp ./source/render.cpp -o Linux_OpenGL -lX11 -lGL -lGLU -lXxf86vm
如何成功编译我的程序?
好吧,我首先不这样做:$(g++ -Wall -pedantic -ansi)
这是在告诉外壳:
"将
g++ -Wall -pedantic -ansi
的输出解释为脚本并执行它"。
这绝对不是你想要的。
仅使用
g++ -Wall -pedantic -ansi ./source/Linux_OpenGL.cpp ./source/render.cpp -o Linux_OpenGL -lX11 -lGL -lGLU -lXxf86vm
相关文章:
- 使用 MEX 编译C++文件
- 获取 clang++:错误:在编译文件系统库的代码时
- 如何交叉编译C++文件
- 使用 MinGW 在 Windows 上的命令行编译C++文件
- 选择特定版本的 Visual Studio 命令行工具包,并根据特定版本的C++运行时环境编译文件
- 解析模板和范围后获取编译文件?
- 我的 PowerShell 脚本无法按预期工作(用于编译C++文件)
- 如何在不制作Visual Studio 2017项目的情况下编译C++文件?
- 'void *' 'void (*) (bool)' 指针使用 c ++ 编译器在 C 中编译文件的错误
- 在没有节点GYP的目标平台上编译C/C 文件
- 生成文件似乎以错误的顺序编译文件
- 编译 C++ 文件失败,因为找不到"ssize_t"的定义
- NeatBeans Makefile:麻烦编译.H文件
- 我无法编译文件系统库
- 在不使用预编译头C++项目中编译 C 文件
- 无法使用 Xcode 和终端在 Mac OS 上使用 OpenGL 库编译 c++ 文件
- 获取编译文件的列表,并由Make Project包含
- MinGW .h 编译文件不起作用:此文件的版本与您运行的 Windows 版本不兼容
- 编译 c++ 文件时出错:未定义的符号
- C++编译文件