GLFW linking issue Visual Studio 2012

前端 未结 2 1642
悲&欢浪女
悲&欢浪女 2021-01-21 17:51

This is driving me mad, I want to statically link to GLFW.lib, following section 4.2.1. of the readme.html file provided I have added glfw.lib and opengl32.lib to the additional

相关标签:
2条回答
  • 2021-01-21 18:08

    Perhaps the reason is because you are linking to these libraries in only one build mode, say, release.

    Second possible reason: (Correct me if I am wrong, as I am not 100% sure of this). The LIB files might have been built in different compiler. For example, the LIB was compiled in MinGW, and you are linking to it with the MSVC++ compiler.

    Third possible reason: Consider what version of GLFW you are using (As in 32 bit, 64 bit).

    0 讨论(0)
  • 2021-01-21 18:19

    Make sure you have glfw.dll in folder with your .exe file. If this wont help, add another library glu32.lib.

    I use to add libraries in code by adding this before main function. With this you see wich libraries you have linek without diging through options and menus.

    #pragma comment(lib, "GLFW.lib")
    #pragma comment(lib, "opengl32.lib")
    #pragma comment(lib, "glu32.lib")
    
    0 讨论(0)
提交回复
热议问题