Und wenn man QTPLUGIN += jpeg
in der Projekt Datei stehen hat, link der automatisch die libs...
Leute, nochmal, wenn man Probleme hat etwas zu verstehen, liesst man sich nochmal die doku durch, dafür ist sie da! Und es ist nicht so, das sowas in der Qt Doku nicht drinsteht. Das ist eine der besten Dokumentationen, die ich kenne...und wenn du unter Windows bist, kannst du die Statements
CONFIG += static
CONFIG += shared
vergessen, weil das eh abhängig von deiner Qt Version ist, ist diese statisch kompiliert, wird sie auch immer statisch gelinkt werden, und umgekehrt.
folgendes gilt für static:
Code: Alles auswählen
To link statically against those plugins, you need to use the Q_IMPORT_PLUGIN() macro in your application and you need to add the required plugins to your build using QTPLUGIN. For example, in your main.cpp:
#include <QApplication>
#include <QtPlugin>
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
Q_IMPORT_PLUGIN(qkrcodecs)
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
...
return app.exec();
}
In the .pro file for your application, you need the following entry:
QTPLUGIN += qjpeg \
qgif \
qkrcodecs hier noch ein link mit demselben Inhalt:
http://www.qtcentre.org/forum/f-qt-prog ... light=jpeg