未定义的引用`_imp__glewInit @ 0' [英] Undefined reference to `_imp__glewInit@0'

查看:889
本文介绍了未定义的引用`_imp__glewInit @ 0'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立了glew lib这么多次。我的最后一个版本删除了对所有着色器函数的未定义引用,例如 glCreateShader()。我认为这个版本是正确的一个原因,我发现代码:块可以打开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()但它导致一个SEGFAULT权利,当 glCreateShader / code>。这是由不初始化gllew造成的。

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:Code :: Blocks

IDE: Code::Blocks

编译器: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'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆