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
Ðаn
  • 10,934
  • 11
  • 59
  • 95
keenest
  • 55
  • 6
  • 1
    Does this answer your question? [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – user7860670 Aug 31 '21 at 19:43
  • @user7860670 I couldn't find anything there that helped me unfortunately – keenest Aug 31 '21 at 19:57
  • Linker > Input > Additional Dependencies setting. The standard values there got wiped out somehow. Add back kernel32.lib, user32.lib, gdi32.lib. – Hans Passant Sep 01 '21 at 09:29
  • @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? – keenest Sep 01 '21 at 12:07
  • Nvm I fixed it and answered – keenest Sep 01 '21 at 13:25
  • In Qt creator you need to add `LIBS *= -luser32` to your .pro file. – Donald Duck Oct 24 '21 at 13:41

1 Answers1

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.

keenest
  • 55
  • 6