christophwth
14-09-2005, 18:21
Hi
wenn ich des hellowolrd beispiel aus dem QT4 tutorial zu kompilieren gibt es einen fehler:
mein vorgehen:
/************************************************** **************
**
** Qt tutorial 1
**
************************************************** **************/
#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();
}
qmake -project
qmake
make
( mit export QTDIR=/usr/share/qt4 )
g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/usr/share/qt4/mkspecs/default -I. -I. -o t1_main.o t1_main.cpp
t1_main.cpp:30:28: error: QApplication: Datei oder Verzeichnis nicht gefunden
t1_main.cpp:31:27: error: QPushButton: Datei oder Verzeichnis nicht gefunden
t1_main.cpp: In function 'int main(int, char**)':
t1_main.cpp:35: error: 'QApplication' was not declared in this scope
t1_main.cpp:35: error: expected `;' before 'app'
t1_main.cpp:37: error: 'QPushButton' was not declared in this scope
t1_main.cpp:37: error: expected `;' before 'hello'
t1_main.cpp:38: error: 'hello' was not declared in this scope
t1_main.cpp:41: error: 'app' was not declared in this scope
t1_main.cpp: At global scope:
t1_main.cpp:33: warning: unused parameter 'argc'
t1_main.cpp:33: warning: unused parameter 'argv'
make: *** [t1_main.o] Fehler 1
ohne (qt3)
g++ -c -pipe -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -I/usr/include/qt3 -o t1_main.o t1_main.cpp
t1_main.cpp:30:28: error: QApplication: Datei oder Verzeichnis nicht gefunden
t1_main.cpp:31:27: error: QPushButton: Datei oder Verzeichnis nicht gefunden
t1_main.cpp: In function 'int main(int, char**)':
t1_main.cpp:35: error: 'QApplication' was not declared in this scope
t1_main.cpp:35: error: expected `;' before 'app'
t1_main.cpp:37: error: 'QPushButton' was not declared in this scope
t1_main.cpp:37: error: expected `;' before 'hello'
t1_main.cpp:38: error: 'hello' was not declared in this scope
t1_main.cpp:41: error: 'app' was not declared in this scope
t1_main.cpp: At global scope:
t1_main.cpp:33: warning: unused parameter 'argc'
t1_main.cpp:33: warning: unused parameter 'argv'
make: *** [t1_main.o] Fehler 1
ich nutze debian sid
installiert ist der gcc in der version Debian 4.0.1-6
nun, meine fragen.
warum wurde das qapplication.h in QApplication geändert ?
warum kann der g++ nichts mit QApplication anfangen ?
fehlt in der sid installation irgendwas ?
installiert sind :
libqt3-mt-dev
libqt4-dev
libqt3-headers
was habe ich übersehen ?
ich bin für jeden hinweis dankbar.
gruss
christoph
wenn ich des hellowolrd beispiel aus dem QT4 tutorial zu kompilieren gibt es einen fehler:
mein vorgehen:
/************************************************** **************
**
** Qt tutorial 1
**
************************************************** **************/
#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();
}
qmake -project
qmake
make
( mit export QTDIR=/usr/share/qt4 )
g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -I/usr/share/qt4/mkspecs/default -I. -I. -o t1_main.o t1_main.cpp
t1_main.cpp:30:28: error: QApplication: Datei oder Verzeichnis nicht gefunden
t1_main.cpp:31:27: error: QPushButton: Datei oder Verzeichnis nicht gefunden
t1_main.cpp: In function 'int main(int, char**)':
t1_main.cpp:35: error: 'QApplication' was not declared in this scope
t1_main.cpp:35: error: expected `;' before 'app'
t1_main.cpp:37: error: 'QPushButton' was not declared in this scope
t1_main.cpp:37: error: expected `;' before 'hello'
t1_main.cpp:38: error: 'hello' was not declared in this scope
t1_main.cpp:41: error: 'app' was not declared in this scope
t1_main.cpp: At global scope:
t1_main.cpp:33: warning: unused parameter 'argc'
t1_main.cpp:33: warning: unused parameter 'argv'
make: *** [t1_main.o] Fehler 1
ohne (qt3)
g++ -c -pipe -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -I/usr/include/qt3 -o t1_main.o t1_main.cpp
t1_main.cpp:30:28: error: QApplication: Datei oder Verzeichnis nicht gefunden
t1_main.cpp:31:27: error: QPushButton: Datei oder Verzeichnis nicht gefunden
t1_main.cpp: In function 'int main(int, char**)':
t1_main.cpp:35: error: 'QApplication' was not declared in this scope
t1_main.cpp:35: error: expected `;' before 'app'
t1_main.cpp:37: error: 'QPushButton' was not declared in this scope
t1_main.cpp:37: error: expected `;' before 'hello'
t1_main.cpp:38: error: 'hello' was not declared in this scope
t1_main.cpp:41: error: 'app' was not declared in this scope
t1_main.cpp: At global scope:
t1_main.cpp:33: warning: unused parameter 'argc'
t1_main.cpp:33: warning: unused parameter 'argv'
make: *** [t1_main.o] Fehler 1
ich nutze debian sid
installiert ist der gcc in der version Debian 4.0.1-6
nun, meine fragen.
warum wurde das qapplication.h in QApplication geändert ?
warum kann der g++ nichts mit QApplication anfangen ?
fehlt in der sid installation irgendwas ?
installiert sind :
libqt3-mt-dev
libqt4-dev
libqt3-headers
was habe ich übersehen ?
ich bin für jeden hinweis dankbar.
gruss
christoph