a lot of LNK2019 errors trying to follow vulkan tutorial
Asked Answered
T

1

1

I was following this tutorial on vulkan but I'm having trouble setting up the environment. My code looks exactly the same. I don't know what else to send here other than the logs since I have no clue what I could've done wrong. There were a lot more errors but stackoverflow didn't let me post, they were all pretty much the same tho. Here's the error log:

1>main.cpp
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_TranslateMessage referenced in function createHelperWindow
1>glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_TranslateMessage
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_DispatchMessageW referenced in function createHelperWindow
1>glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_DispatchMessageW
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_PeekMessageW referenced in function createHelperWindow
1>glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_PeekMessageW
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_RegisterDeviceNotificationW referenced in function createHelperWindow
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_UnregisterDeviceNotification referenced in function _glfwPlatformTerminate
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_CreateWindowExW referenced in function createHelperWindow
1>glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_CreateWindowExW
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_DestroyWindow referenced in function _glfwPlatformTerminate
1>glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_DestroyWindow
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_ShowWindow referenced in function createHelperWindow
1>glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_ShowWindow
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_ToUnicode referenced in function _glfwUpdateKeyNamesWin32
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_MapVirtualKeyW referenced in function _glfwUpdateKeyNamesWin32
1>glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_MapVirtualKeyW
1>glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_SystemParametersInfoW referenced in function _glfwPlatformInit
1>glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_SystemParametersInfoW
1>glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_CreateDCW referenced in function _glfwPlatformGetGammaRamp
1>glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_DeleteDC referenced in function _glfwPlatformGetGammaRamp
1>glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceCaps referenced in function _glfwGetMonitorContentScaleWin32
1>glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceGammaRamp referenced in function _glfwPlatformGetGammaRamp
1>glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_SetDeviceGammaRamp referenced in function _glfwPlatformSetGammaRamp
1>glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function _glfwGetMonitorContentScaleWin32
Testify answered 31/8, 2021 at 19:31 Comment(6)
Does this answer your question? What is an undefined reference/unresolved external symbol error and how do I fix it?Starchy
@Starchy I couldn't find anything there that helped me unfortunatelyTestify
Linker > Input > Additional Dependencies setting. The standard values there got wiped out somehow. Add back kernel32.lib, user32.lib, gdi32.lib.Pannier
@HansPassant thanks so much! that removed a lot of the errors but there are still 5 left, are there any other standards i could add?Testify
Nvm I fixed it and answeredTestify
In Qt creator you need to add LIBS *= -luser32 to your .pro file.Savdeep
T
1

To fix the issue I went into my Linker > Input > Additional Dependencies and checked the box that says "Inherent from parents or project defaults" and it now compiles without any errors.

Testify answered 1/9, 2021 at 13:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.