You are not logged in.
Pages: 1
For example:
Compiling default KDevelop Qt4 program:
g++ -c -pipe -Wall -W -mtune=generic -march=i686 -O2 -pipe -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/opt/qt/mkspecs/linux-g++ -I. -I/opt/qt4/include -o main.o main.cpp
main.cpp:22:24: error: QApplication: No such file or directory
In file included from main.cpp:23:
example.h:25:23: error: QMainWindow: No such file or directory
example.h:26:23: error: QCloseEvent: No such file or directory
In file included from main.cpp:23:
example.h:33: error: expected class-name before '{' token
example.h:34: error: ISO C++ forbids declaration of 'Q_OBJECT' with no type
example.h:36: error: expected ';' before 'public'
example.h:41: error: 'QCloseEvent' has not been declared
......................
make[1]: Target `first' not remade because of errors.
make: *** [sub-src] Error 2
make: Target `first' not remade because of errors.
*** Exited with status: 2 ***
--------------------------
echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/java/bin:/opt/java/jre/bin:/opt/kde/bin:/opt/mozilla/bin:/opt/qt4/bin:/opt/qt4/bin:/opt/qt4/bin
I have done "qt-config qt4" -> "source /etc/profile".
What is wrong?
Last edited by Ferhiord (2007-09-25 21:14:23)
Sorry, if my English is not very well.
Offline
It's telling you exactly what's up.
main.cpp:22:24: error: QApplication: No such file or directory
Search for that file, it's in a subfolder under opt/qt4/include, QtGui, I suspect. You have to specify those folders I am afraid.
Why don't you use qmake to generate project and makefile?
Last edited by roodie (2007-09-26 19:37:38)
----
g8m
Offline
If you use KDevelop, I think you need to provide QT4 Path before compiling anything.
Look in your project option.
May I suggest using QDevelop?
http://aur.archlinux.org/packages.php?d … s=0&SeB=nd
Shaika-Dzari
http://www.4nakama.net
Offline
Pages: 1