LINUX.ORG.RU

qmake -project qmake make

anonymous
()
Ответ на: комментарий от pisun

ну, там наверное было написано, что и как надо запускать ? qmake -project && qmake && make. И ошибки надо показывать! А не говорить "не компилится". Может, у тебя хедеры не стоят или ещё что.

Keiko
()
Ответ на: комментарий от Keiko

[/home/temp/qt]$ ls
hello.cpp
[root in /home/temp/qt]$ qmake -project && qmake && make
g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG  -I/usr/qt/3/mkspecs/linux-g++ -I. -I. -I/usr/qt/3/include -o hello.o hello.cpp
hello.cpp:10:2: warning: no newline at end of file
g++  -o qt hello.o    -L/usr/X11R6/lib -lXext -lX11 -lm
hello.o(.text+0x2a): In function `main':
: undefined reference to `QApplication::QApplication[in-charge](int&, char**)'
hello.o(.text+0x50): In function `main':
: undefined reference to `QString::QString[in-charge](char const*)'
hello.o(.text+0x6e): In function `main':
: undefined reference to `QLabel::QLabel[in-charge](QString const&, QWidget*, char const*, unsigned)'
hello.o(.text+0x84): In function `main':
: undefined reference to `QString::shared_null'
hello.o(.text+0x8e): In function `main':
: undefined reference to `QStringData::deleteSelf()'
hello.o(.text+0x9a): In function `main':
: undefined reference to `QApplication::setMainWidget(QWidget*)'
hello.o(.text+0xad): In function `main':
: undefined reference to `QApplication::exec()'
hello.o(.text+0xb7): In function `main':
: undefined reference to `QApplication::~QApplication [in-charge]()'
hello.o(.text+0xe0): In function `main':
: undefined reference to `QString::shared_null'
hello.o(.text+0xea): In function `main':
: undefined reference to `QStringData::deleteSelf()'
hello.o(.text+0x104): In function `main':
: undefined reference to `QApplication::~QApplication [in-charge]()'
hello.o(.gnu.linkonce.r._ZTV6QGList+0xc): undefined reference to `QGList::clear()'
hello.o(.gnu.linkonce.r._ZTV6QGList+0x10): undefined reference to `QGList::~QGList [in-charge]()'
hello.o(.gnu.linkonce.r._ZTV6QGList+0x14): undefined reference to `QGList::~QGList [in-charge deleting]()'
hello.o(.gnu.linkonce.r._ZTV6QGList+0x18): undefined reference to `QPtrCollection::newItem(void*)'
hello.o(.gnu.linkonce.r._ZTV6QGList+0x20): undefined reference to `QGList::compareItems(void*, void*)'
hello.o(.gnu.linkonce.r._ZTV6QGList+0x24): undefined reference to `QGList::read(QDataStream&, void*&)'
hello.o(.gnu.linkonce.r._ZTV6QGList+0x28): undefined reference to `QGList::write(QDataStream&, void*) const'
hello.o(.gnu.linkonce.r._ZTI6QGList+0x8): undefined reference to `typeinfo for QPtrCollection'
collect2: ld returned 1 exit status
make: *** [qt] Ошибка 1
[/home/temp/qt]$

pisun
() автор топика
Ответ на: комментарий от Spicinpv

надо qmake юзать тогда такие проблемы рассасываются сами собой

the_coder ★★
()

ага, это известный глюк :) Каталог с прожектом не должен носить имя "qt". Переименуй во что-нибудь другое :)

Keiko
()
Ответ на: комментарий от Keiko

>Каталог с прожектом не должен носить имя "qt".
>Переименуй во что-нибудь другое :)

спасибо. Помогло.

pisun
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.