Linker error with glew when library is statically linked

前端 未结 1 1322
故里飘歌
故里飘歌 2021-01-24 03:13

I am trying to build an opengl project in Visual Studio 2012. I wanted to statically include glew library, so I built it from source and copied the generated glew32sd.lib to my

相关标签:
1条回答
  • 2021-01-24 03:41

    You have two problems in the linker settings:

    • 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 requires you to also link agains the opengl library. Add OpenGL32.lib to the additional dependencies.

    0 讨论(0)
提交回复
热议问题