问题
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