Static link: Q_IMPORT_PLUGIN(qico) unresolved external symbol
-
[quote author="igromanru" date="1386089950"]Ok, but how can I use a .pro file? SO far as I know, Visual Studio don´t using the .pro file for compiling the application.
And there are no .pro, .pri or other Qt files in my project folder.[/quote]
Then add the qico.lib to the project's "Additional Dependencies" option.
Right click on the project and click Properties. In the "Linker"-Section you can add the qico.lib file and set a "Additional Library Directories". So the Linker can find the symbols. -
[quote author="raven-worx" date="1386317327"]
Then add the qico.lib to the project's "Additional Dependencies" option.
Right click on the project and click Properties. In the "Linker"-Section you can add the qico.lib file and set a "Additional Library Directories". So the Linker can find the symbols.
[/quote]
I got it all the time.
That how it looks like: "JPG":https://www.dropbox.com/s/gf0work3tdci24h/add_dep.JPG (German version)
It´s a screenshot of the debug settings, but the release settings looks similiar. -
and $(QTDIR) points to the correct path? You can check if you click on the "Command Line" entry in the Linker section
-
[quote author="raven-worx" date="1386321519"]and $(QTDIR) points to the correct path? You can check if you click on the "Command Line" entry in the Linker section[/quote]
If $(QTDIR) would be a wrong path, I would have many problems in the whole project. And the windows plugin works too. -
haha...good point... sry for this :)
-
[quote author="couragic" date="1390806939"]This works for me:
...
Q_IMPORT_PLUGIN (QICOPlugin)
...I have looked in qicod.lib and have found qt_static_plugin_QICOPlugin function symbol.[/quote]
Thank you very much. This was the solution![quote author="steno" date="1393375998"][quote author="igromanru" date="1386003876"]
"Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)" works great.
[/quote]Which libraries did you link with to get this to work? I'm trying to clear up a small hand full of linker errors with qwindows.lib.[/quote]
Sorry for late answer.
This is all my linked LIBs:
qtmain.lib
Qt5Core.lib
Qt5Gui.lib
Qt5Widgets.lib
qico.lib
ws2_32.lib
sicudt.lib
sicuuc.lib
qminimal.lib
qwindows.lib
opengl32.lib
Qt5PlatformSupport.lib
imm32.lib
winmm.lib -
Hello Qt-Community,
I go a unsolved problem. I couln´t find a solution in google or in the forum so I have to ask here.
I want to compile a static version of my program for privat use but I got the following problem:
I see no icons in my application, as a solution I have found "this":http://qt-project.org/forums/viewthread/13367 thread.
So I have added "Q_IMPORT_PLUGIN(qico)" in my main.cpp.
@#include <QApplication>
#include <QtPlugin>Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
Q_IMPORT_PLUGIN(qico)@If I try to compile, I get this error:
@main.obj : error LNK2019: unresolved external symbol ""struct QStaticPlugin const __cdecl qt_static_plugin_qico(void)" (?qt_static_plugin_qico@@YA?BUQStaticPlugin@@XZ)" in function ""public: __thiscall StaticqicoPluginInstance::StaticqicoPluginInstance(void)" (??0StaticqicoPluginInstance@@QAE@XZ)".@My Dev system:
Visual Studio 2012, Windows 7 x64.
Under Linker-> Input I have added "qico.lib" and all other necessary libs as additional dependencies.
Without "Q_IMPORT_PLUGIN(qico)" I can compile my application and it´s works fine.i got this message from CONFIG+=static
the problem is that StaticqicoPluginInstance is nowhere in the 5.4 package. it has no qico.lib
-
Hi and welcome to devnet,
You won't find this file in a Qt package as they only provide dynamic libraries. If you want a static Qt you'll have to build it yourself. Be aware of the licensing issues that comes with it.
-
You need to add QT_STATICPLUGIN to your preprocessor macro, when buildimg plugin