How to compile Qt as static

前端 未结 1 1797
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 21:51

I am currently writing code in Qt. How to compile the code statically?

From Qt document I came to know the following step

1) Visual Studio 2008 -> commandPro

相关标签:
1条回答
  • You have already used the only way possible: compiling the source as static.

    Some things that have a very large impact on disk size (which seems to be the problem here), with corresponding configure arguments:

    1. Disable debug: -release
    2. Disable modules you don't need, especially QtWebKit: -no-webkit -no-script -no-scripttools -no-qt3support -nomake demos -nomake tools -nomake examples
    3. Disable LTCG support, which has the nasty side effect of generating huge static libraries: no-ltcg

    These should help keep the build size to a minimum.

    0 讨论(0)
提交回复
热议问题