Hello!
I'm have a problem: I writed a simple application. There are:
form/test.ui
include/mainwin.h
include/testdialog.h
src/mainwin.cpp
src/testdialog.cpp
mainwin.pro
mainwin.pro listing:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
unix{
UI_DIR = .ui
MOC_DIR = .moc
OBJECTS_DIR = .obj
}
TEMPLATE = app
TARGET = test
INCLUDEPATH += include
FORMS = form/test.ui
HEADERS = include/mainwin.h \
include/testdialog.h
SOURCES = src/mainwin.cpp \
src/testdialog.cpp
|
I do:
$QT4/bin/qmake
make
And see this:
|
Source code
|
1
2
3
4
5
6
|
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.0.0/mkspecs/default -I. -I/usr/local/Trolltech/Qt-4.0.0/include/QtGui -I/usr/local/Trolltech/Qt-4.0.0/include/QtCore -I/usr/local/Trolltech/Qt-4.0.0/include -Iinclude -I.moc -I.ui -o .obj/mainwin.o src/mainwin.cpp
In file included from src/mainwin.cpp:7:
include/testdialog.h:1:21: ui_test.h: No such file or directory
In file included from src/mainwin.cpp:7:
include/testdialog.h:9: error: syntax error before `::' token
make: *** [.obj/mainwin.o] Error 1
|
(ui_test.h: No such file or directory)
Ok.
If I move testdialog.h from ./include/ to ./ (and edit mainwin.pro HEADERS from include/testdialog.h to testdialog.h) compiling is Ok!
Is this bug?
How to compile program in first?
PS in attachment work and not worked versions
Thx