![](/img/trans.png)
[英]libigl, GLEW, GLFW, and Eigen on CLion, Windows 10. Linker Errors
[英]GLFW Linker errors in Visual Studio 10
我在遵循此人教程的Visual Studio 10.0上设置GLFW时遇到问题。 但是我仍然收到链接错误
1>GLFW.lib(window.obj) : error LNK2005: __glfwClearWindowHints already defined in window.obj
1>GLFW.lib(window.obj) : error LNK2005: __glfwClearInput already defined in window.obj
1>GLFW.lib(window.obj) : error LNK2005: __glfwInputKey already defined in window.obj
1>GLFW.lib(window.obj) : error LNK2005: __glfwInputChar already defined in window.obj
1>GLFW.lib(window.obj) : error LNK2005: __glfwInputMouseClick already defined in window.obj
1>GLFW.lib(window.obj) : error LNK2005: __glfwChooseFBConfig already defined in window.obj
1>GLFW.lib(window.obj) : error LNK2005: __glfwInputDeactivation already defined in window.obj
1>GLFW.lib(init.obj) : error LNK2005: __glfwInitialized already defined in init.obj
1>GLFW.lib(glext.obj) : error LNK2005: __glfwParseGLVersion already defined in glext.obj
1>GLFW.lib(glext.obj) : error LNK2005: __glfwStringInExtensionString already defined in glext.obj
1>GLFW.lib(glext.obj) : error LNK2005: __glfwRefreshContextParams already defined in glext.obj
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
我曾尝试使用Google搜索错误,但没有找到太多帮助。 我已经在链接器设置中链接了opengl32 / lib和glu32.lib。 我还链接了包括和lib的适当文件夹。 我从GLFW网站下载并链接了win32二进制文件和原始zip。
任何帮助表示赞赏。
该教程有点过时了(发布于2005年4月27日)。 您可能两次向两个不同的项目中添加了一些源文件,因此对符号的已有定义提出了抱怨。
似乎GLFW 2.7.x不包含用于自动构建所需所有内容的MSVC makefile脚本,但是如果可以选择切换到最新的GLFW 3.0,则可以使您的生活更轻松,因为它们支持cmake:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.