且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

静态链接库时链接器出现错误

更新时间:2023-02-12 13:54:25

链接器设置中存在两个问题:

You have two problems in the linker settings:

  • 您可以链接到glew的静态链接版本或动态链接的版本,但不能两者同时链接.因此,如果要静态链接,请从其他依赖项中删除glew32d.lib(或在发布模式下为glew32.lib).

  • You can link against the statically linked version of glew or the dynamically linked one, but never against both. So if you want glew statically linked remove glew32d.lib (or glew32.lib in release mode) from the additional dependencies.

Glew还需要您再次链接opengl库.将OpenGL32.lib添加到其他依赖项中.

Glew requires you to also link agains the opengl library. Add OpenGL32.lib to the additional dependencies.