You are not logged in.
Pages: 1
all im trying to do is get this to compile:
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}
and here is the errors i get:
/home/nick/Projects/test1/main.cpp|1|error: QApplication: No such file or directory|
/home/nick/Projects/test1/main.cpp|2|error: QLabel: No such file or directory|
/home/nick/Projects/test1/main.cpp||In function 'int main(int, char**)':|
/home/nick/Projects/test1/main.cpp|5|error: 'QApplication' was not declared in this scope|
/home/nick/Projects/test1/main.cpp|5|error: expected `;' before 'app'|
/home/nick/Projects/test1/main.cpp|6|error: 'QLabel' was not declared in this scope|
/home/nick/Projects/test1/main.cpp|6|error: 'label' was not declared in this scope|
/home/nick/Projects/test1/main.cpp|6|error: expected type-specifier before 'QLabel'|
/home/nick/Projects/test1/main.cpp|6|error: expected `;' before 'QLabel'|
/home/nick/Projects/test1/main.cpp|8|error: 'app' was not declared in this scope|
||=== Build finished: 9 errors, 0 warnings ===|
im assuming its because i dont have the qt4 headers installed but i could be wrong. how do i install them?
Offline
im assuming its because i dont have the qt4 headers installed but i could be wrong. how do i install them?
Did you try
pacman -S qt
Offline
Did you try
pacman -S qt
yeah,
bash-3.2# pacman -S qt
warning: qt-4.4.3-5 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...
Targets (1): qt-4.4.3-5
Total Download Size: 17.85 MB
Total Installed Size: 57.29 MB
Proceed with installation? [Y/n]
maybe im just setting it up wrong. is there a special way you have to do it w/ codeblocks?
Last edited by grimrider (2009-03-07 01:11:01)
Offline
Okay, I googled it for you.
In the same directory as your source code run:
qmake -project; qmake; make
Presto, chango, magico! It works!
Offline
yeah, i knew how to do it that way. i guess i should have been more specific. what exactly do i have to do to get it to compile in Code::Blocks?
Offline
Have a look at QtWorkbench -- http://code.google.com/p/qtworkbench/
Offline
Pages: 1