Hi, I have a tried all the ways and means. I can have the linker to link successfully. I have decided to use qico plugin just to be even simpler.
c++ source file: #include <QtPlugin> Q_IMPORT_PLUGIN(qico) .pro file: QTPLUGIN += qico win32 { CONFIG += dll LIBS += qico.lib } build output: error LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_qico(void)" (?qt_static_plugin_qico@@YA?BUQStaticPlugin@@XZ) referenced in function "public: __thiscall StaticqicoPluginInstance::StaticqicoPluginInstance(void)" (??0StaticqicoPluginInstance@@QAE@XZ) Any ideas? Regards, Nuno On 22/05/2015 17:44, Thiago Macieira wrote: > On Friday 22 May 2015 16:37:27 Nuno Santos wrote: >> Hi, >> >> I have compiled Qt statically. In this process I have found two >> difficulties: >> >> - If I don't compile it with -developer-build I don't have the plugins >> compiled > That's a bug, please report. > >> - When I finally got plugins compiled, they are static libs > Of course. > >> When my program is about to start it asks about plugin windows (i assume >> it is the platforms/qwindows.dll) > Which is a static library that you need to link into your application. Qmake > has some logic to automatically process staticplugins. > >> What is the process to deploy an application with a static build of qt? > Try a lot and figure it out for the plugins. Make sure they are getting linked > into your binary and make sure they are getting initialised too. For each > staticplugin, qmake should generate an extra .cpp file that calls a function > from the plugin to register itself. > > In order to do that, you need to list all plugins you want to use in a > variable (I don't remember the name, it must be in the docs). > _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest