PDA

View Full Version : Updated ui_FUBAR.h not used in build



gib
3rd October 2010, 23:15
A small puzzle. My Windows Qt project is in a directory, let's call it \FUBAR. This is where all the source code, the .pro file, and FUBAR.ui reside. When I build it the executable is placed in \FUBAR-desktop\Release. If I make changes to FUBAR.ui and build, the new ui_FUBAR.h is placed in \FUBAR-desktop, but the build looks for it in \FUBAR. If the file is not in \FUBAR the build issues this error: "error: No rule to make target `../FUBAR/ui_FUBAR.h', needed by `release/main.o'." To build with the new version I have to copy it into this directory. It's a very trivial issue, but there must be a way to correct this.

ChrisW67
4th October 2010, 04:01
What does you PRO file look like and are you building this manually or is Qt Creator doing a shadow build for you?

gib
4th October 2010, 04:57
The PRO file is like this:

CONFIG += release
INCLUDEPATH += C:\VTK-build-4.4.0-static C:\VTK-build-4.4.0-static\rendering \
C:\VTK-src\GUISupport\Qt C:\VTK-src\common C:\VTK-src\rendering \
C:\VTK-src\graphics C:\VTK-src\filtering C:\VTK-src\IO C:\VTK-src\imaging \
INCLUDEPATH += c:/qt/qwt-5.2.1/src
FORMS = ABM_GUI.ui
HEADERS = mainwindow.h qmylabel.h params.h plot.h log.h myvtk.h misc.h libpara32.h
RESOURCES += icons.qrc
SOURCES = main.cpp mainwindow.cpp params.cpp plot.cpp myvtk.cpp misc.cpp lognormal.cpp
LIBS += -L"c:\VTK-build-4.4.0-static\bin" -lQVTK -lvtkRendering -lvtkGraphics -lvtkImaging -lvtkIO -lvtkFiltering -lvtkCommon \
-lvtkpng -lvtktiff -lvtkjpeg -lvtkexpat -lvfw32 -lopengl32 -lVPIC -lCosmo \
-lwsock32 -lvtksys -lws2_32 -lvtkexoIIc -lvtkNetCDF \
-lvtklibxml2 -lvtkzlib -lpthread -lvtkalglib \
-lgdi32 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
LIBS += -LC:\users\gib\abm\build32msvs\release -lpara32
LIBS += -LC:\qt\qwt-5.2.1\lib -lqwt5
DEPENDPATH += c:/qt/qwt-5.2.1/lib
QT += network
QMAKE_CXXFLAGS += -Wno-deprecated -Wno-write-strings
target.path = .
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS ABM_GUI.pro icons
sources.path = .
INSTALLS += target sources

Qt Creator does the build.