[Qt-creator] Fwd: Qt-creator can't find the location of the executable it built

Mildred Ki'Lya ml.mildred593 at gmail.com
Tue May 5 13:22:45 CEST 2009


Hi,

I have a problem with QtCreator. When I try to start the executable,
it can't find it. On Windows, I get:



Starting C:/Project/configurator.shanti/main/debug/configurator.exe...

The process could not be started!



In fact, the executable is located in
C:/Project/configurator.shanti/debug/configurator.exe. The project
main.pro looks like:

# -------------------------------------------------
# Project created by QtCreator 2009-03-24T16:23:40
# -------------------------------------------------
QT += xml
TARGET = configurator
TEMPLATE = app
SOURCES += main.cpp
RESOURCES += ../resources.qrc
debug {
    DESTDIR=../debug
    LIBS += -L../debug
} else:release {
    DESTDIR=../release
    LIBS += -L../release
}
LIBS += -lcontroler -lglobalihm
INCLUDEPATH += ..
DEPENDPATH += ..


I modified the DESTDIR variable because i needed the executable to be
in the same directory as the dynamic libraries it needs.

With the same project, on GNU/Linux, it would try to find the
executable in the directory configurator.shanti/main/configurator
(notice, it doesn't search in the debug directory)

Is there a way to tell QtCreator to look for the executable ni the
correct directory?
Woulde it be possible to do so without modifying .pro.user files
(those are not saved in the subversion repository and frequently
erased since they can be thje source of some problems)

If not, I think I'll have to create a dummy configurator.exe program
that would just do cd ../.. && exec configurator $@ (what a pity we
can't do shell scripts that way on Windows)

Thanks.

Mildred




More information about the Qt-creator-old mailing list