Results 1 to 4 of 4
Hello every one ,,
I'm bignner in linux and qt ,,
I have a problem when I try to compile my first program using qt
I use qt3 and the ...
- 02-23-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 2
problem in compiling qt program
Hello every one ,,
I'm bignner in linux and qt ,,
I have a problem when I try to compile my first program using qt
I use qt3 and the version of qmake is : 1.07a (Qt 3.3.7)
after running makeb comand the output is :
and here is the code of main.cppCode:/usr/share/qt3/bin/uic hello.ui -o .ui/hello.h Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed g++ -c -pipe -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I/usr/share/qt3/include -I.ui/ -I. -I.moc/ -o .obj/main.o main.cpp main.cpp:1:26: error: qapplication.h: No such file or directory In file included from main.cpp:2: .ui/hello.h:13:22: error: qvariant.h: No such file or directory .ui/hello.h:14:21: error: qdialog.h: No such file or directory .ui/hello.h:23: error: expected class-name before ‘{’ token .ui/hello.h:24: error: ISO C++ forbids declaration of ‘Q_OBJECT’ with no type .ui/hello.h:26: error: expected ‘;’ before ‘public’ .ui/hello.h:34: error: expected `:' before ‘slots’ .ui/hello.h:35: error: expected primary-expression before ‘virtual’ .ui/hello.h:35: error: ISO C++ forbids declaration of ‘slots’ with no type .ui/hello.h:35: error: expected ‘;’ before ‘virtual’ main.cpp: In function ‘int main(int, char**)’: main.cpp:6: error: ‘QApplication’ was not declared in this scope main.cpp:6: error: expected `;' before ‘a’ .ui/hello.h:28: error: ‘hello::~hello()’ is private main.cpp:7: error: within this context main.cpp:8: error: ‘class hello’ has no member named ‘show’ main.cpp:9: error: ‘a’ was not declared in this scope main.cpp:9: error: ‘lastWindowClosed’ was not declared in this scope main.cpp:9: error: ‘SIGNAL’ was not declared in this scope main.cpp:9: error: ‘quit’ was not declared in this scope main.cpp:9: error: ‘SLOT’ was not declared in this scope main.cpp: At global scope: main.cpp:4: warning: unused parameter ‘argc’ main.cpp:4: warning: unused parameter ‘argv’ make: *** [.obj/main.o] Error 1
also I tries hello word program in this link lhttp://linuxhelp.blogspot.com/2006/0...ojects-on.htmCode:#include <qapplication.h> #include "hello.h" int main( int argc, char ** argv ) { QApplication a( argc, argv ); hello w; w.show(); a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) ); return a.exec(); }
but the samse problem appeard
could you please help me

Any help is greatly appreciated
This post has been edited 5 time(s), it was
- 02-23-2008 #2
What Linux distribution are you using? Do you have qt3-devel installed?
- 02-23-2008 #3Just Joined!
- Join Date
- Feb 2008
- Posts
- 2
I use Debian ,,
Sorry but when I try to intall it like that apt-get install qt3-devel
, the resuslt is that :
Reading package lists... Done
Building dependency tree... Done
E: Couldn't find package qt3-devel
do I install it in wrong way
- 02-23-2008 #4
On Debian based distros install libqt3-dev e.g.
Code:aptitude update aptitude install libqt3-dev


Reply With Quote