📜  找不到 glew32.dll - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:49.550000             🧑  作者: Mango

代码示例1
//if you are using "glew32s.lib" file you may have to add GLEW_STATIC in the 
//c/c++ preprocessor, if you are using visual studio go to project-> 
//properties -> c/c++ -> Preprocessor -> Preprocessor Definitions 
//and add GLEW_STATIC.
//or use '#define GLEW_STATIC' before every include of glew.h

//the next part is copied from glew.h
//which is why you have to add GLEW_STATIC in Preprocessor Definitions or define it
//or the code will look for the glew32.dll file
///////////////////////////////////////
/*
 * GLEW_STATIC is defined for static library.
 * GLEW_BUILD  is defined for building the DLL library.
 */

#ifdef GLEW_STATIC
#  define GLEWAPI extern
#else
#  ifdef GLEW_BUILD
#    define GLEWAPI extern __declspec(dllexport)
#  else
#    define GLEWAPI extern __declspec(dllimport)
#  endif
#endif

///////////////////////////////////////