[英]How to compile Qt plugins statically and dynamically
I came through terms dynamic and static compiling in Qt. 我在Qt中经历过动态和静态编译的术语。 Could some one explain the difference and how there are done in practice. 有人可以解释一下差异以及在实践中如何做到这一点。
First thing, you need to compile the dynamic plugin as a dll and the static plugin as a static library. 首先,您需要将动态插件编译为dll,将静态插件编译为静态库。
So for the static add something like this to your project file 因此,对于静态添加这样的东西到您的项目文件
CONFIG *= staticlib #
The dynamic version is just a standard dll, ie 动态版本只是一个标准的dll,即
CONFIG *= dll
Second, specify that you are compiling a plugin: 其次,指定您正在编译插件:
CONFIG *= qt plugin
So what's the difference between those two? 那两者之间有什么区别?
I prefer 2. because it gives you more control over your build environment and makes the app deployment less buggy... 我更喜欢2.,因为它可以让您更好地控制构建环境,并减少应用程序的部署错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.