PDA

View Full Version : Changing source directory



Dirty_Dylan
11th June 2012, 03:04
So I have a source directory /home/project. I want to change this directory to to say /home/documents/project. If I cut and paste the contents of the folder I get
":-1: warning: The build directory needs to be at the same level as the source directory." when trying to compile how do I tell QT that I have moved folder.

ChrisW67
11th June 2012, 10:24
What is generating that error message?

Dirty_Dylan
11th June 2012, 11:54
This is the compile output.

20:20:39: Running build steps for project 4-2...
20:20:39: Starting: "/usr/bin/make" clean -w
make: Entering directory `/home/.../Documents/QT/4/4-2-build-desktop-Qt_4_8_1_in_PATH__System__Release'
rm -f main.o
rm -f *~ core *.core
make: Leaving directory `/home/.../Documents/QT/4/4-2-build-desktop-Qt_4_8_1_in_PATH__System__Release'
20:20:39: The process "/usr/bin/make" exited normally.
20:20:39: Configuration unchanged, skipping qmake step.
20:20:39: Starting: "/usr/bin/make" -w
make: Entering directory `/home/.../Documents/QT/4/4-2-build-desktop-Qt_4_8_1_in_PATH__System__Release'
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../4-2 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I../4-2 -I. -o main.o ../4-2/main.cpp
g++ -Wl,-O1 -o 4-2 main.o -L/usr/lib/i386-linux-gnu -lQtGui -lQtCore -lpthread
make: Leaving directory `/home/.../Documents/QT/4/4-2-build-desktop-Qt_4_8_1_in_PATH__System__Release'
20:20:41: The process "/usr/bin/make" exited normally.

wysota
11th June 2012, 12:05
Call qmake prior to running make.

Dirty_Dylan
11th June 2012, 13:24
Thanks, it seems to be compiling now. However it still issues the same warning.

:-1: warning: The build directory needs to be at the same level as the source directory.

21:52:19: Configuration unchanged, skipping qmake step.
21:52:19: Starting: "/usr/bin/make" -w
make: Entering directory `/home/.../Documents/QT/4/4-2-build-desktop-Qt_4_8_1_in_PATH__System__Release'
make: Nothing to be done for `first'.
make: Leaving directory `/home/.../Documents/QT/4/4-2-build-desktop-Qt_4_8_1_in_PATH__System__Release'
21:52:19: The process "/usr/bin/make" exited normally.

wysota
11th June 2012, 16:22
Could you explain step by step what you are doing? Are you using command line, Qt Creator or how else do you build your program?

Dirty_Dylan
12th June 2012, 07:40
I am using Qt Creator. I just build then run the program. I have also tried to clean and re-build.

ChrisW67
12th June 2012, 08:24
Qt Creator has an expectation that its shadow build directory will have the same parent directory as the source directory. The shadow build directory is not specified in the PRO file but in the Qt Creator, Projects, Build Settings. You will see the warning there also. It will also prohibit a shadow build directory inside the source directory: in this case it refuses to build.

This has been done to counter some qmake issues that can arise with shadow building inside the source tree (although I've never seen them myself).

Dirty_Dylan
12th June 2012, 09:26
Thanks, so you have to go to projects and then change the build settings from there. It is working now :)