c++ - Can't generate a full statically linked application -


i've been trying on 15 consecutive hours find way statically compile native c++ game in manner doesn't require dlls (which believe crt related).

users download game complaining of several missing dlls such as:

vcruntime140.dll api-ms-win-core-timezone-l1-1-0.dll api-ms-win-core-timezone-l2-1-0.dll api-ms-win-core-processthreads-l1-1-1.dll (and list goes on) 

my current command line building is:

/mp /gs /gl /analyze- /w3 /gy /zc:wchar_t /zi /gm- /o2 /sdl /fd"release\vc140.pdb" /zc:inline /fp:precise /d "win32" /d "_crt_secure_no_warnings" /d "_win32_winnt=0x0501" /d "bot_protection" /d "client" /d "fw_graphics" /d "fw_net" /d "fw_xml" /d "ndebug" /d "_mbcs" /errorreport:prompt /wx- /zc:forscope /gd /oy- /oi /mt /fa"release\" /ehsc /nologo /fo"release\\win32\src\%(relativedir)\" /fp"release\otclient.pch"  

any thoughts?

/mt indeed tells compiler link crt executable. however, that's insufficient if another dll still has dependency on vcruntime140.dll. dll's can depend on other dll's, circularly. windows loads them in order encountered, unless loaded. if test.exe depends on a.dll, windows loads a.dll. if a.dll depends on b.dll, windows loads b.dll. if b.dll depends on a.dll, it's loaded.

next, api-ms-... new windows dll's. implement old kernel32.dll , similar dlls. won't cause dependency on vcruntime140.dll. it's unclear how end depending on those.

then there other dll's don't list. 1 of must causing problems see.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -