What?
I tried installing that binary package, and then tried compiling my Hello World program with "g++", it came back with errors
C:\Documents and Settings\Administrator\My Documents\QtExamples\helloworld>g++ h
elloworld.cpp
helloworld.cpp:1:25: QApplication: No such file or directory
helloworld.cpp:2:24: QPushButton: No such file or directory
helloworld.cpp: In function `int main(int, char**)':
helloworld.cpp:6: error: `QApplication' was not declared in this scope
helloworld.cpp:6: error: expected `;' before "app"
helloworld.cpp:8: error: `QPushButton' was not declared in this scope
helloworld.cpp:8: error: expected `;' before "hello"
helloworld.cpp:9: error: `hello' was not declared in this scope
helloworld.cpp:12: error: `app' was not declared in this scope
helloworld.cpp:13:3: warning: no newline at end of file
#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
I'm so confused what I'm SUPPOSED to do and what I'm NOT SUPPOSED to do..
Bookmarks