glfw-rs icon indicating copy to clipboard operation
glfw-rs copied to clipboard

How to use this in windows?

Open Xt-8 opened this issue 8 years ago • 1 comments

Could someone help me get this working in windows. I've got it set up as a dependency, I have default-features = false as the readme page specifies for windows. I tried setting a path to my GLFW compilation but that didn't work and the linker kept complaining that it couldn't find GLFW.lib, so I added a rust build script (build.rs) with println!("cargo:rustc-link-search=native=<path\\to\\folder\\containing\\glfw.lib>"); Now it no longer complains it can't find GLFW.lib, but I get 60 unresolved external symbol errors like the following:

glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_SystemParametersInfoW referenced in function _glfwPlatformInit
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_ChangeDisplaySettingsExW referenced in function _glfwSetVideoModeWin32
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplaySettingsW referenced in function _glfwPlatformGetVideoModes
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplaySettingsExW referenced in function _glfwPlatformGetMonitorPos

What am I doing wrong?

Xt-8 avatar Jun 20 '16 03:06 Xt-8

Hmm.. I switched from the MSVC version of rust to the GNU version of rust, and also switched from the MSVC GLFW binaries to the GNU ones and now everything works.. so I don't know if that means the issue is with Rust or what.

Xt-8 avatar Jun 20 '16 05:06 Xt-8