Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
/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
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 |
#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();
}
|

This post has been edited 5 times, last edit by "R.M" (Feb 23rd 2008, 1:49pm)