Qt Creator Not Recognizing New Project Build Directory

  • I'm having a silly problem with Qt Creator. It doesn't let me change the default Working Directory for my project. I moved the project to a new location which caused the problem. I can change the working directory under Projects --> Run however it won't change the default. If I select shadow build it uses the old working directory. When I build I get:

    The build directory needs to be at the same level as the source directory.

    I renamed some of the extra files sitting around to loghelper.pro.userold file, loghelper.pro.user.3.0-pre1old, loghelper.pro.user.3.2-pre1old, loghelper.pro.user.627e749old and all 3 Makefiles to old as well hoping to force a rebuild of whatever component was using the old working directory but with no success.

    Also I did Run qmake and Clean Project as well.

    Any ideas? Thanks!

  • Lifetime Qt Champion


    IIRC, that's just a warning.

    Can you share your .pro file ?

  • Thanks. Sure he goes. Also I get

    LNK1181: cannot open input file 'release\main.obj'
    # Project created by QtCreator 2013-11-14T14:26:53
    QT       += core gui
    QT       += network
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    TARGET = loghelper
    TEMPLATE = app
    INCLUDEPATH += "C:\OpenSSL-Win32\include"
    LIBS += -LC:\OpenSSL-Win32\lib -llibeay32 -lssleay32
    SOURCES += main.cpp\
            loghelper.cpp \
        logentry.cpp \
        clicklabel.cpp \
    HEADERS  += loghelper.h \
        logentry.h \
        clicklabel.h \
    CONFIG += static
    CONFIG += release

  • And this is somewhat just a nuisance I can set the build directory manually just wondering why Qt Creator doesn't play nice with the shadow build option after resetting the working directory.

  • Solved the problem! The default working directory is the working directory as of the last time you closed the project (maybe save not sure). So I set the working directory to the new one by unchecking shadow build, closed the project, then re-opened it and the default shadow build working directory was updated. Now clicking shadow build works again. Somewhat unintuitive but oh well.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.