Страница 1 из 1

[QT] hello world

Добавлено: 2009-11-08 15:37:21
Gloft
Откуда берется hello.o
Как я понял ошибка из-за него.

Код: Выделить всё

malutka# ls -l
total 2
-rwxr-xr-x  1 gloft  gloft  201 16 июн  2008 hello.cpp
malutka# cat hello.cpp 
#include <QApplication>
#include <QLabel>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QLabel *label = new QLabel("Hello Qt!");
    label->show();
    return app.exec();
}
malutka# qmake -project
malutka# ls -l
total 4
-rwxr-xr-x  1 gloft  gloft  201 16 июн  2008 hello.cpp
-rw-r--r--  1 root   gloft  286  8 ноя 14:41 hello.pro
malutka# qmake hello.pro 
malutka# ls -l
total 8
-rw-r--r--  1 root   gloft  2850  8 ноя 14:41 Makefile
-rwxr-xr-x  1 gloft  gloft   201 16 июн  2008 hello.cpp
-rw-r--r--  1 root   gloft   286  8 ноя 14:41 hello.pro
malutka# make
g++34 -c -pipe -Wall -W -O2  -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/local/share/qt/mkspecs/freebsd-g++34 -I. -I. -I../../../../local/include -I/include -o hello.o hello.cpp
g++34:No such file or directory
*** Error code 1

Stop in /usr/home/gloft/projects/hello.


Re: [QT] hello world

Добавлено: 2009-11-09 2:18:28
zingel

Код: Выделить всё

malutka# qmake hello.pro
malutka# ls -l
total 8
-rw-r--r--  1 root   gloft  2850  8 ноя 14:41 Makefile
-rwxr-xr-x  1 gloft  gloft   201 16 июн  2008 hello.cpp
-rw-r--r--  1 root   gloft   286  8 ноя 14:41 hello.pro
malutka# make
g++34 -c -pipe -Wall -W -O2  -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/local/share/qt/mkspecs/freebsd-g++34 -I. -I. -I../../../../local/include -I/include -o hello.o hello.cpp
g++34:No such file or directory
*** Error code 1

Stop in /usr/home/gloft/projects/hello.
просто нажмите там же

Re: [QT] hello world

Добавлено: 2009-11-09 3:46:45
Гость
g++34:No such file or directory
это что за компилятор такой?

Re: [QT] hello world

Добавлено: 2009-11-09 4:17:01
zingel
похоже на линуксовое

Re: [QT] hello world

Добавлено: 2009-11-09 5:08:03
Гость

Код: Выделить всё

qmake -spec freebsd-g++ -o Makefile hello.pro
make

Re: [QT] hello world

Добавлено: 2009-11-09 20:02:24
Gloft

Код: Выделить всё

qmake -spec freebsd-g++ -o Makefile hello.pro
make
Именно то что нужно. Все работает =).