You are not logged in.

1

Tuesday, July 20th 2010, 3:47pm

Statically compiling a plugin

Hi,

I am trying to statically compile an application but I am getting the following error message while linking:

Linking...
loading_screen_type_1.obj : error LNK2001: unresolved external symbol "class QObject * __cdecl qt_plugin_instance_qgif(void)" (?qt_plugin_instance_qgif@@YAPAVQObject@@XZ)
loading_screen_type_1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
loading_screen_type_1.exe - 2 error(s), 0 warning(s)

I have reconfigured Qt 4.4 using the following flags: -qt-gif -static

Then rebuilt Qt with the command: nmake sub-src

I added the following line to my .pro:

Source code

1
QTPLUGIN += qgif


And I added this to the file containing my main procedure:

Source code

1
2
#include <QtPlugin> 
Q_IMPORT_PLUGIN(qgif)


Did I miss anything?

Thanks in advance.

Rate this thread