Undefined reference to `_imp__glewInit@0#39;(对 `_imp__glewInit@0 的未定义引用)
问题描述
我已经多次构建了glew lib.我的最后一次构建删除了对所有着色器函数的未定义引用,例如 glCreateShader().我认为这个版本是正确的,因为我发现 Code:Blocks 可以打开 Visual Studio 6.0 项目,所以它为我准备了一切.
I have built the glew lib so many times. My last build removed the undefined references to all the shader functions such as glCreateShader(). I think this build is the correct one cause I found out that Code:Blocks can open Visual Studio 6.0 projects so it had everything laid out for me.
我可以在不调用 glewInit() 的情况下编译我的应用程序,但是当 glCreateShader() 被调用时它会导致一个 SEGFAULT.这是由于未初始化发光引起的.
I can compile my app without calling glewInit() but it results in a SEGFAULT right when glCreateShader() is called. Which is caused by not Initializing glew.
我需要打开它但它不会让我XD
I need to turn it on but it wont let me XD
链接:mingw32、glew32、opengl32、glu32、glut32
links: mingw32, glew32, opengl32, glu32, glut32
IDE:代码::块
编译器:MinGW32
Compiler:MinGW32
推荐答案
省去很多麻烦,只需将 glew.c 直接添加到您的项目中即可.我不明白为什么人们如此努力地从外部链接到它.许可证是友好的,它只是一个源文件.只记得#define GLEW_STATIC.
Save yourself a lot of trouble and just add the glew.c to your project directly. I do not understand why people fight so hard to link to it externally. The license is friendly, and it is only one source file. Just remember to #define GLEW_STATIC.
这篇关于对 `_imp__glewInit@0' 的未定义引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:对 `_imp__glewInit@0' 的未定义引用
基础教程推荐
- 如何在 C++ 中初始化静态常量成员? 2022-01-01
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
- 常量变量在标题中不起作用 2021-01-01
- 在 C++ 中计算滚动/移动平均值 2021-01-01
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- 我有静态或动态 boost 库吗? 2021-01-01
- C++结构和函数声明。为什么它不能编译? 2022-11-07
- 如何通过C程序打开命令提示符Cmd 2022-12-09
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 这个宏可以转换成函数吗? 2022-01-01
