Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 2.2.0
-
None
Description
The Qt spectrum demo has a different .pro file structure to the other demos, as it consists not just of an executable, but also a DLL:
spectrum/ spectrum.pro spectrum.pri app/ app.pro 3rdparty/ fftreal/ fftreal.pro
In order to ensure that the demo can be launched by qtdemo, the .pro files contains DESTDIR directives which put the binaries (both spectrum.exe, built by app.pro, and fftreal.dll, built by fftreal.pro) into ${BUILD_ROOT}/debug or ${BUILD_ROOT}/release depending on the build configuration. This is done as follows:
# In spectrum.pri win32 { build_pass { CONFIG(release, release|debug): spectrum_build_dir = /release CONFIG(debug, release|debug): spectrum_build_dir = /debug } }
# In fftreal.pro TEMPLATE = lib TARGET = fftreal DESTDIR = ../..$${spectrum_build_dir}
# In app.pro TEMPLATE = app TARGET = spectrum LIBS += -L..$${spectrum_build_dir} LIBS += -lfftreal DESTDIR = ..$${spectrum_build_dir}
The problem is that QtCreator does not run a build_pass step, so the spectrum_build_dir variable never gets set. This means that it always tries to launch a binary from ${BUILD_ROOT}/spectrum.exe
Attachments
Issue Links
- replaces
-
QTCREATORBUG-8001 MSVC: Creator builds executable with postfix 'd', want's to run exe without 'd'
- Closed
-
QTCREATORBUG-8502 Qt Creator can't load exe correct when add suffixes to TARGET
- Closed
-
QTBUG-18106 creator tries to run release binary when debug build is selected
- Closed