如何減小lazarus編譯可執行文件的大小

1. Project|Compiler Options|Code| Smart Linkable (-CX) -> Checked
2. Project|Compiler Options|Linking|Debugging|Display Line Numbers in Run-time ErrorBacktraces (-gl) -> Unchecked
3. Project|Compiler Options|Linking|Debugging|Strip Symbols From Executable (-Xs) -> Checked
4. Project|Compiler Options|Linking|Link Style|Link Smart (-XX) -> Checked

The most important seem to be 2 and 3. The executable size should be now 2-3 MB instead of 16 MB.

5. Run upx <your_executable> to compress your binary by a factor of 2-3.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章