PDA

View Full Version : Using QtCreator on Ubuntu



feraudyh
2nd March 2011, 15:41
Hello, i'd been using Qt on Windows XP and decided to port my project to Ubuntu, using QtCreator.
There was very little work involved, but I did get a surprise that all the object files were being created in the same directory as the source files as well as the executable.

All of this despite the fact that if I right-clicked on the project icon and looked at the item "Define the compilation configuration" I had
"Debug" as I had in Windows.

I had expected the object and executable to be created in the Debug subdirectory.

wysota
2nd March 2011, 15:53
On unix systems the compilation is traditionally done in the same directory as the source files (or to be more precise in the "current" directory) and I'm not speaking about Qt but programming in general. If you wish to override this behaviour, add appropriate entries about the DESTDIR and optionally a couple of other variables to your project file.

feraudyh
2nd March 2011, 17:07
Thanks,
Looking into the manual I adapted an example to do this:
CONFIG += debug_and_release

CONFIG(debug, debug|release) {
TARGET = myApp
DESTDIR = debug
} else {
TARGET = myApp
DESTDIR = release
}