發布乙個用vs2015寫的cpp應用,附帶的vc redist太大怎麼辦?

時間 2021-06-01 18:49:55

1樓:

api-ms-win-core-console-l1-1-0.dll

api-ms-win-core-datetime-l1-1-0.dll

api-ms-win-core-debug-l1-1-0.dll

api-ms-win-core-errorhandling-l1-1-0.dll

api-ms-win-core-file-l1-1-0.dll

api-ms-win-core-file-l1-2-0.dll

api-ms-win-core-file-l2-1-0.dll

api-ms-win-core-handle-l1-1-0.dll

api-ms-win-core-heap-l1-1-0.dll

api-ms-win-core-interlocked-l1-1-0.dll

api-ms-win-core-libraryloader-l1-1-0.dll

api-ms-win-core-localization-l1-2-0.dll

api-ms-win-core-memory-l1-1-0.dll

api-ms-win-core-namedpipe-l1-1-0.dll

api-ms-win-core-processenvironment-l1-1-0.dll

api-ms-win-core-processthreads-l1-1-0.dll

api-ms-win-core-processthreads-l1-1-1.dll

api-ms-win-core-profile-l1-1-0.dll

api-ms-win-core-rtlsupport-l1-1-0.dll

api-ms-win-core-string-l1-1-0.dll

api-ms-win-core-synch-l1-1-0.dll

api-ms-win-core-synch-l1-2-0.dll

api-ms-win-core-sysinfo-l1-1-0.dll

api-ms-win-core-timezone-l1-1-0.dll

api-ms-win-core-util-l1-1-0.dll

api-ms-win-crt-conio-l1-1-0.dll

api-ms-win-crt-convert-l1-1-0.dll

api-ms-win-crt-environment-l1-1-0.dll

api-ms-win-crt-filesystem-l1-1-0.dll

api-ms-win-crt-heap-l1-1-0.dll

api-ms-win-crt-locale-l1-1-0.dll

api-ms-win-crt-math-l1-1-0.dll

api-ms-win-crt-multibyte-l1-1-0.dll

api-ms-win-crt-private-l1-1-0.dll

api-ms-win-crt-process-l1-1-0.dll

api-ms-win-crt-runtime-l1-1-0.dll

api-ms-win-crt-stdio-l1-1-0.dll

api-ms-win-crt-string-l1-1-0.dll

api-ms-win-crt-time-l1-1-0.dll

api-ms-win-crt-utility-l1-1-0.dll

js.exe

mozglue.dll

msvcp140.dll

nss3.dll

ucrtbase.dll

vcruntime140.dll

不好意思,之前打錯,以為是vc2005, vc2015確實沒有研究過,不過我見過類似的做法,

這個題主可以參考下

看了下除了js.exe其他的壓縮前只有3M

2樓:清香白蓮

其實你可以不用crt,直接用Windows API。

只要指定自定義入口函式WinMain

不要用std的東西

main函式return前呼叫ExitProcess退出程序(CRT就這麼幹的不然你會發現Win10下主線程沒了,3個Worker執行緒還在。Win10以前沒這問題,因為Win10開始用執行緒池載入DLL。當然如果你不引用DLL也可以直接return。

編出來的東西只有幾k。

c庫一些東西也是可以用的,譬如memcpy,需要靜態鏈結CRT,並不會讓程式大多少。

3樓:shaoyuan

或者link到vc6的runtime,vc的runtime所有系統自帶,也就是說,你鏈了vc6的runtime之後,只發布乙個exe即可。

VS2015編寫的C 程式發布到全新的Win7系統需要什麼條件?

mingkuang 出來獻醜了,可以使用VC LTL,這樣可以讓VC2015 2017編譯的程式鏈結到系統自帶的msvcrt.dll,同時可以任性的使用所有編譯器最新特性。幫助你擺脫UCRT的折磨。Chuyu Team VC LTL 丿尋靈 說實話,如果你的程式使用了DLL的話,不建議用MT模式發布...

可以用 Python 寫只暴露乙個 function 的模組嗎?

如果你是問在 module 中定義多個函式並選擇性地暴露其中乙個的話,答案是 嚴格來說不可以 你可以用單下劃線來定義 module 的私有成員,從而防止它們被自動匯入 file test.py deffoo print foo def bar print bar 此時 from test impor...

能否用一句話寫乙個故事?

我覺得我們的古詩詞裡就有很多這種一句話寫乙個故事的。少小離家老大回,鄉音無改鬢毛衰。東風不與周郎便,銅雀春深鎖二喬。桃李春風一杯酒,江湖夜雨十年燈。至今思項羽,不肯過江東。朱門酒肉臭,路有凍死骨。馮唐易老,李廣難封。可憐無定河邊骨,猶是深閨夢裡人。嫦娥應悔偷靈藥,碧海青天夜夜心。夕陽西下,斷腸人在天...