Results 1 to 9 of 9

Thread: Changing source directory

  1. #1
    Join Date
    May 2012
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Changing source directory

    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.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Changing source directory

    What is generating that error message?

  3. #3
    Join Date
    May 2012
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Changing source directory

    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.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Changing source directory

    Call qmake prior to running make.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2012
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Changing source directory

    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.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Changing source directory

    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?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. The following user says thank you to wysota for this useful post:

    Dirty_Dylan (12th June 2012)

  8. #7
    Join Date
    May 2012
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Changing source directory

    I am using Qt Creator. I just build then run the program. I have also tried to clean and re-build.

  9. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Changing source directory

    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).

  10. The following user says thank you to ChrisW67 for this useful post:

    Dirty_Dylan (12th June 2012)

  11. #9
    Join Date
    May 2012
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Changing source directory

    Thanks, so you have to go to projects and then change the build settings from there. It is working now

Similar Threads

  1. How can I watch for changing current directory?
    By UASlaX in forum Qt Programming
    Replies: 4
    Last Post: 6th September 2011, 15:05
  2. Replies: 0
    Last Post: 10th March 2011, 13:55
  3. ld: warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/
    By Caius Aérobus in forum Installation and Deployment
    Replies: 2
    Last Post: 19th January 2011, 09:02
  4. Changing default directory of output files
    By bigbill in forum Newbie
    Replies: 1
    Last Post: 6th December 2010, 00:18
  5. Changing the directory of the command prompt
    By Rakula in forum General Programming
    Replies: 3
    Last Post: 21st October 2010, 15:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.