linking to glew in c

十年热恋 提交于 2019-12-19 04:04:11

问题


I can't link properly to glew.

I have done:

#define GLEW_STATIC
#include "glew/glew.h"
#pragma comment(lib, "glew/glew32s.lib")

However, I still get the error:

LNK2019: unresolved external symbol __glewGenBuffersARB referenced in function initialize


回答1:


Save yourself a lot of trouble and just put the glew.c file into your project. I never bother with linking to a glew library externally. Once you have that in there, the GLEW_STATIC macro will work. It's only one file, and (if this matters to you) it will carry nicely across platforms (rather than having to rebuild several OS-specific libs).



来源:https://stackoverflow.com/questions/11027485/linking-to-glew-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!