Hi Wysota,
I now rebuilt my Qt4.3.3 froum source by doing:
prompt> configure -static -release -no-exceptions
prompt>make sub-src
prompt> configure -static -release -no-exceptions
prompt>make sub-src
To copy to clipboard, switch view to plain text mode
I then put the following in my main.cpp
#include <QtPlugin>
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
Q_IMPORT_PLUGIN(qmng)
#include <QtPlugin>
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
Q_IMPORT_PLUGIN(qmng)
To copy to clipboard, switch view to plain text mode
and the following in myproject.pro
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += staticlib
QTPLUGIN += qjpg \
qgif \
qmng
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += staticlib
QTPLUGIN += qjpg \
qgif \
qmng
To copy to clipboard, switch view to plain text mode
Still the compilation is not happening. I get "cannot find -lqjpg".
When I remove what I put in main.cpp (see above) and I remove "QTPLUGIN += qjpg \ qgif \ qmng" then the program compiles fine and works, too but cannot open image files other than BMP.
So I think that I either don't have the proper plugins or I declare them wrong.
My question is: what does a static plugin file look like? What name, what extention, where does it reside? Is it possible that I did not build static plugins when I compiled Qt from source as described above?
Bookmarks