Linking, error LNK2019: unresolved external symbol

Started by promo, 28 June 2024, 03:32:13


Hello - I am receiving the following error during a build of my project in VS 2022 64b. I've reviewed the doc for the VS setup and think I have everything setup correctly. tgui 1.3 and sfml 2.6.1.

Anything obvious I am missing? I've tried a few different paths but must be missing something, thanks in advance for any insight!

Error   LNK2019   unresolved external symbol _Thrd_sleep_for referenced in function "void __cdecl std::this_thread::sleep_until<struct std::chrono::steady_clock,class std::chrono::duration<__int64,struct std::ratio<1,1000000000> > >(class std::chrono::time_point<struct std::chrono::steady_clock,class std::chrono::duration<__int64,struct std::ratio<1,1000000000> > > const &)" (??$sleep_until@Usteady_clock@chrono@std@@V?$duration@_JU?$ratio@$00$0DLJKMKAA@@std@@@23@@this_thread@std@@YAXAEBV?$time_point@Usteady_clock@chrono@std@@V?$duration@_JU?$ratio@$00$0DLJKMKAA@@std@@@23@@chrono@1@@Z)   [..path snip..]tgui-s-d.lib(unity_WINDOW_BACKEND_SFML_cxx.obj)   1   Build   


Is your Visual Studio up-to-date?

If a library is build with e.g. VS 2022 17.5 then it will work for on never versions such as 17.8 but it isn't guaranteed to work on 17.4

Visual Studio Installer tells me that I currently have VS 2022 17.9.4 installed. Assuming I didn't update it since I built the TGUI 1.3 libraries, it means that you might be getting this linker error because your VS 2022 version is older than 17.9


Thank you

I am on 17.9.6

I built from repo last night and set TGUI_CXX_STANDARD to 20 and this seems to have worked well for my issues.
I have worked through the example login screen demo and so far no additional errors.