无法与 mingw 交叉编译 opengl 程序
Can't cross compile opengl program with mingw
我想从 debian 编译适用于 Windows 的程序
> '/opt/mingw32/bin/i686-w64-mingw32-g++' '/home/redrockfish/Projects/OpenGl0/main.cpp' -o arcanoid.exe -static-libstdc++ -static-libgcc -lglu32 -lopengl32 -lglut32
/tmp/ccrvQIKM.o:main.cpp:(.text+0x1c): undefined reference to `_imp____glutInitWithExit@12'
/tmp/ccrvQIKM.o:main.cpp:(.text+0x3e): undefined reference to `_imp____glutCreateWindowWithExit@8'
/tmp/ccrvQIKM.o:main.cpp:(.text+0x60): undefined reference to `_imp____glutCreateMenuWithExit@8'
/opt/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.0/../../../../i686-w64-mingw32/bin/ld: /tmp/ccrvQIKM.o: bad reloc address 0x0 in section `.ctors'
collect2: error: ld returned 1 exit status
如果我删除-lglut32
则未确定的引用数量会增加。 标题,如果Freeglut.h,取自官方网站。 用glut替换glut32,添加-lGLU没有帮助。 与 -lGL
cannot find -lGL
collect2: error: ld returned 1 exit status
像__glutCreateWindowWithExit
这样的函数不是官方 GLUT API 的一部分。实际上,该函数是由freeglut(甚至不是其外部API的一部分(进行的扩展,因此您不能链接一些随机的GLUT DLL,而是链接freeglut(可用于Windows(。
相关文章:
- 如何使实例化在我的 OpenGL 程序中工作?
- OpenGL程序不显示三角形
- C++ 如何在 OpenGL 程序中远程调用控制台窗口
- 您是否必须在 OpenGL 程序中调用 glfwSwapInterval(1)?
- 如何在 debian 下正确链接一个 opengl 程序?
- 无法与 mingw 交叉编译 opengl 程序
- OpenGL 程序无法链接?
- OpenGL 程序着色器链接错误
- OpenGL程序不显示任何图片
- 在 MacOSX 上编译 OpenGL 程序时出错('ld:找不到 -lopengl32 的库)
- 带有张量流的OpenGL程序C++对cuInit进行了失败的调用:CUDA_ERROR_OUT_OF_MEMORY
- 无法在Linux Minut中运行简单的OpenGL程序
- 无法将 Linux openGL 程序与 mingw32 交叉编译。配置.log错误:未定义对"_glEnable"的引用
- 当窗口聚焦时,OpenGL程序不会循环
- 如何从 OpenGL 程序中删除未使用的资源
- OpenGL程序在Qt Creator中没有启动
- GLSDK - 无法执行示例 OpenGL 程序
- 如何将.ray文件添加到opengl程序中
- 为什么这个C++/OpenGL程序运行两次
- Qt 5.5和OpenGL:程序在没有任何明显原因的情况下表现得很奇怪