简体   繁体   中英

Can't get opengl/glfw to work with vs2015

Whenever I try to make a call from glfw I get a linking error,the header files are all setup so don't worry about them.So the problem is that VS doesn't seem to find the .lib files, I have tried to give the full path to glfw3.lib and I also have tried with both .lib files (glfw3.lib,glfw3dll.lib) but without success.. I also have glew and sfml incase I should mention that.

Screenshots from the setup: http://imgur.com/WlrGTHq&XIKFdeE&seDfSGP The error I'm receiving is "LNK2019"

From your screenshots it looks like you're trying to link the x64 GLWF library in the Win32 configuration, when I reproduce that setup I am also greeted by a number of error LNK2019 s.

There should also have been a warning that could have tipped you off:

main.obj : error LNK2019: unresolved external symbol _glfwShowWindow
referenced in function _main

D:\Dev\glfw-3.1.2.bin.WIN64\lib-vc2015\glfw3.lib : warning LNK4272: 
library machine type 'x64' conflicts with target machine type 'X86'

If I build the x64 configuration, it links and runs fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM