Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法同时将 qt 配置为静态和共享库?Qt 只允许使用配置选项 -static 和 -shared,但没有 -static-and-shared 之类的东西。谢谢你的提前!
您需要构建 Qt 两次,一次配置 -static,一次配置 -shared。您可以进行源外构建,这样您就不必复制源文件。在 Windows 上(jom 随 Qt Creator 提供,在 Unix 上使用 gmake 而不是 jom):
mkdir qtstatic cd qtstatic c:\qt\5.2.1\configure -static ... jom cd .. mkdir qtshared cd qtshared c:\qt\5.2.1\configure -shared ... jom cd ..