Okay, so I got Qt Creator yesterday on windows XP. I downloaded the qt-sdk-win-opensource-2009.03.exe and installed then. Then I got the official book "C++ GUI Programming with Qt4." I was following along one of the first few examples, some very easy stuff. This example was a window that has a button and when you click the button the app quits:
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QObject::connect(button,
SIGNAL(clicked
()),
&app,
SLOT(quit
()));
button->show();
return app.exec();
}
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton *button = new QPushButton("Quit");
QObject::connect(button, SIGNAL(clicked()), &app, SLOT(quit()));
button->show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
So I was really excited to show my friend. I sent him the executable and then he got an error message saying he needed mingwm10.dll. So I added that, and then he needed QtGui4.dll and QtCore4.dll. And so my application, which just shows a button, turned out to be over 13 MB. I'm wondering, is there a way to configure Qt Creator, so that when I build in release mode (I hope that's something I'm not making up), it just creates a standalone executable that doesn't require the .dlls to be with it? I was reading lots of stuff online, but it all confuses me, because I'm a noob. I think the solution to my problem has something to do with static building, but I'm not quite sure, and I couldn't understand any of the articles regarding that. I need some serious walk-through help. Thank you for your time and patience!
Bookmarks