在 Visual C++工程文件中引用了FreeGLUT,结果编译是出现了这个错误:
error LNK1104: cannot
在opengl.org网站的论坛里找到了答案:https://www.opengl.org/discussion_boards/showthread.php/186328-error-link-1104
Hey man I don’t know well has : Properties > C/C++ > Preprocessor > Preprocessor Definitions and type NDEBUG. What this there defined then use “freeglut.lib” otherwise it’s going to use the “freeglutd.lib”. So Preprocessor Definitions, you are now using the “freeglut.lib”. Hopefully this helps you out!
解决办法是这样的:
更改 Visual C++工程项目属性,在 C/C++ | Preprocessor | Preprocessor Definitions 的设置中,,增加一个宏定义 NDEBUG 即可:
NDEBUG
穿越茫茫人海,寻找属于我们的那一份宁静。