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.
我正在为某些应用程序开发插件,并且正在使用 libtiff。过滤器工作正常,但有一个问题。有一些 .dll 文件必须包含在编译路径中。当我在 \QtSDK\Desktop\Qt\4.8.1\mingw\bin 中添加这些 .dll 时,插件工作正常,但是当我删除一个或多个这些 .dll 时,应用程序无法识别插件。默认情况下,这些 .dll 不包含在 Qt SDK 中。
有什么方法可以在我的插件中包含这些 .dll 并添加它们的路径,而无需将它们复制到 Qt SDK bin 文件夹中。
通常我将我的插件添加到我的应用程序目录并将这行代码添加到main()main.cpp 中,如下所示:
main()
qApp->addLibraryPath(QString("."));
图像插件进入imageformats,SQL 驱动程序(ODBC)进入sqldrivers. 您可以将库路径设置为相对于应用程序根目录的任何您想要的路径。我喜欢保持简单,只引用根目录。
imageformats
sqldrivers