Jump to content
The Dark Mod Forums

Recommended Posts

Posted

 I'm trying to get TDM build working on my laptop.

Just installed VC2022, and now I get the following error:

1>OpenAL32.lib(alc.obj) : error LNK2019: unresolved external symbol __imp___std_init_once_begin_initialize referenced in function alcOpenDevice
1>OpenAL32.lib(alc.obj) : error LNK2019: unresolved external symbol __imp___std_init_once_complete referenced in function alcOpenDevice

Searching has lead me to this issue:

https://developercommunity.visualstudio.com/t/-imp-std-init-once-complete-unresolved-external-sy/1684365
https://github.com/microsoft/STL/issues/2655

Obviously, developers accidentally broke binary compatibility on minor update of Visual C++ compiler (in version: 17.2 Preview 2).
While they are seeking the way to fix it, I'd recommend to not update your Visual Studio in the near future.


If you already suffer from this issue, then you can workaround it by adding the following e.g. to the end of Lib.cpp:

#if defined(_M_IX86)
	#pragma comment(linker, "/ALTERNATENAME:__imp____std_init_once_begin_initialize@16=__imp__InitOnceBeginInitialize@16") 
	#pragma comment(linker, "/ALTERNATENAME:__imp____std_init_once_complete@12=__imp__InitOnceComplete@12") 
#elif defined(_M_X64)
	#pragma comment(linker, "/ALTERNATENAME:__imp___std_init_once_begin_initialize=__imp_InitOnceBeginInitialize") 
	#pragma comment(linker, "/ALTERNATENAME:__imp___std_init_once_complete=__imp_InitOnceComplete") 
#endif

I'm not yet sure if we should commit this workaround, to be honest 😄
In theory, it does not break build, but adds a last resort option: if linker doesn't find symbol {nameonleft}, then it tries to use symbol {nameonright} instead of it.

  • Like 1
  • Thanks 2
Posted

Classic case of pathologic corporate update obsession, microsoft edition. Those updates tend to offer nothing most of the time, yet something new breaks. It’s almost as if dozens of my clones are employed there!

  • Like 1
Posted
8 minutes ago, duzenko said:

Classic case of pathologic corporate update obsession, microsoft edition. Those updates tend to offer nothing most of the time, yet something new breaks. It’s almost as if dozens of my clones are employed there!

Hey, most of the new C++ features are added in minor updates of VC!
They arrive under new compiler switches, though 😁

It just shows that even great developers like STL in companies like Microsoft sometimes break things which must not be broken, and that brings major suffering onto many users 😥
I wonder if they'll fix this issue on VC2022, or simply let it live until the next major version of VC.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • JackFarmer

      German Intelligence (BND) just revealed, why MS Outlook is down: even the MS CEO has been seduced by a Chinese spy and the BND just published a convincing picture of the agent:

      Way to go, lads!
       
       
      · 2 replies
    • JackFarmer

      I will NOT return to Discord. Who wants to try something new?
       
      · 12 replies
    • JackFarmer

      I do not understand why Gilmour/Waters trash the "Atom Heart Mother" album and wish for that "all existing copies get dumped".
      I think it is a great recording. Is there something wrong inside my twisted little brain?
      · 3 replies
    • revelator

      Asus ROG strix x570-E gaming ryzen 3700x 32 gb ram radeon RX9070XT 10 tb ssd space (all full)
      · 5 replies
    • The Black Arrow

      I was playing Doom 3, and I learned how to edit maps text-by-text, this should help me a lot with finding secrets and locations I hope.
      That is, if I feel sneaky and greedy...Which I always do, can't get enough 100% a mission.
      · 3 replies
×
×
  • Create New...