Hi! After a lot of trouble of making Qt work together with Boost, I had realized that I can't compile a boost application with MinGW, and that I can't compile a Qt application from Visual Studio. At least directly from visual studio. Or can I? A way that I found and which worked was to open "Visual Studio 2008 Command Prompt", cd to the folder containing the source files, type "qmake -project", then just "qmake", and finally "nmake". Or is there any simpler way? I would rather just be able to write a batch file and invoke that by double clicking on it, but I don't know how to make it run in the visual studio command prompt instead of the normal one.
Anyway, in that way I could compile a Qt hello world program (which I could only find by googling on it, not on Qt's web page!):
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
hello.resize(100, 30);
hello.show();
return app.exec();
}
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.resize(100, 30);
hello.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
However, after just adding the row "#include <stdint.h>", I got this error message:
.\hello_world.cpp(3) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
.\hello_world.cpp(3) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
To copy to clipboard, switch view to plain text mode
Why can't the compiler find stdint.h? Don't nmake know that it's supposed to look in "C:\Program Files\Microsoft Visual Studio 9.0\VC\include" (where stdint.h is located) after include files?
Edit: I am using this program for a project in school and it's very time critical, in fact it is already quite delayed! Please, does anyone know what this problem is caused by? Am I doing this in the right way or should I do it in some other way? I am using Qt 4.6. Thank you really much in advance!
-Kristofer
Bookmarks