bitChanger
18th August 2008, 02:42
I'm compiling a static application on Windows XP with MSVC 2005 Pro and Qt 4.4.1. Here is what I've done so far:
c:\Qt\4.4.1> configure -static -qt-libjpeg -release
c:\Qt\4.4.1> nmake sub-src
Here is my .pro file:
TEMPLATE = app
QT += opengl
CONFIG += static
QTPLUGIN += qjpeg
RESOURCES += symbols.qrc
HEADERS += window.h
SOURCES += window.cpp \
main.cpp
Here is my .qrc file:
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>symbols.jpeg</file>
</qresource>
</RCC>
Here is my main.cpp:
#include <QApplication>
#include <QtPlugin>
#include "window.h"
Q_IMPORT_PLUGIN(qjpeg)
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(symbols);
QApplication app(argc, argv);
Window window;
window.show();
return app.exec();
}
Here is my call to the image:
QImage symbols = QImage(":/symbols.jpeg");
This application compiles and works great on developer machine. After running it on another computer that does not have Qt or MSVC the application runs but the image does not show up.
I've read the Deployment manuals, the Plugin manuals, and a lot of posts on the forum for this topic. I'm still missing something. I've even tried .bmp, .gif. and now .jpeg.
Any ideas?
c:\Qt\4.4.1> configure -static -qt-libjpeg -release
c:\Qt\4.4.1> nmake sub-src
Here is my .pro file:
TEMPLATE = app
QT += opengl
CONFIG += static
QTPLUGIN += qjpeg
RESOURCES += symbols.qrc
HEADERS += window.h
SOURCES += window.cpp \
main.cpp
Here is my .qrc file:
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>symbols.jpeg</file>
</qresource>
</RCC>
Here is my main.cpp:
#include <QApplication>
#include <QtPlugin>
#include "window.h"
Q_IMPORT_PLUGIN(qjpeg)
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(symbols);
QApplication app(argc, argv);
Window window;
window.show();
return app.exec();
}
Here is my call to the image:
QImage symbols = QImage(":/symbols.jpeg");
This application compiles and works great on developer machine. After running it on another computer that does not have Qt or MSVC the application runs but the image does not show up.
I've read the Deployment manuals, the Plugin manuals, and a lot of posts on the forum for this topic. I'm still missing something. I've even tried .bmp, .gif. and now .jpeg.
Any ideas?