(C++) Qt Creator differences between Run and Debug modes
February 24, 2017 · View on GitHub
(C++) 


Qt Creator differences between Run and Debug modes
There are the following differences between Run and Debug mode:
- The slashes in a filename's path vary (*):


Desktop Run:
'C:\QtSDK\Projects\CppQtCreatorDifferences-build-desktop\debug\CppQtCreatorDifferences.exe'
(screenshot (png))

Desktop Debug:
'C:/QtSDK/Projects/CppQtCreatorDifferences-build-desktop/debug/CppQtCreatorDifferences.exe'
(screenshot (png))

Simulator Run:
'C:\QtSDK\Projects\CppQtCreatorDifferences-build-simulator\debug\CppQtCreatorDifferences.exe'
(screenshot (png))

Simulator Debug:
'C:/QtSDK/Projects/CppQtCreatorDifferences-build-simulator/debug/CppQtCreatorDifferences.exe'
(screenshot (png))

Desktop Run:
'/home/richel/qtsdk-2010.04/bin/Projects/Website/CppQtCreatorDifferences-build-desktop/CppQtCreatorDifferences'
(screenshot (png))

Desktop Debug:
'/home/richel/qtsdk-2010.04/bin/Projects/Website/CppQtCreatorDifferences-build-desktop/CppQtCreatorDifferences'
(screenshot (png))

Simulator Run:
'/home/richel/qtsdk-2010.04/bin/Projects/Website/CppQtCreatorDifferences-build-simulator/CppQtCreatorDifferences'
(screenshot (png))

Simulator Debug:
'/home/richel/qtsdk-2010.04/bin/Projects/Website/CppQtCreatorDifferences-build-simulator/CppQtCreatorDifferences'
(screenshot (png))
- Different DLL's/shared libaries are called
(*) This is checked by the program below.
Technical facts
Operating system(s) or programming environment(s)
Symbian
Ubuntu 10.10 (maverick)
VirtualBox
3.2.8_OSEr64453
Windows XP
Qt Creator 2.0.1
(on Ubuntu)
Qt Creator from
Symbian SDK 2.1 (on Windows)
- G++ 4.4.5
Libraries used:
Qt: version 4.7.0 (32 bit)
Qt project file: CppQtCreatorDifferences.pro
#------------------------------------------------- # # Project created by QtCreator 2011-02-09T11:50:27 # #------------------------------------------------- QT += core gui TARGET = CppQtCreatorDifferences CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp \ dialog.cpp HEADERS += \ dialog.h FORMS += \ dialog.ui unix:!symbian { maemo5 { target.path = /opt/usr/bin } else { target.path = /usr/local/bin } INSTALLS += target }
dialog.cpp
#include "dialog.h" #include "ui_dialog.h" Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); } Dialog::~Dialog() { delete ui; } void Dialog::setText(const char* c) { ui->label->setText(c); }
dialog.h
#ifndef DIALOG_H #define DIALOG_H #include <QDialog> namespace Ui { class Dialog; } class Dialog : public QDialog { Q_OBJECT public: explicit Dialog(QWidget *parent = 0); ~Dialog(); void setText(const char* ); private: Ui::Dialog *ui; }; #endif // DIALOG_H
main.cpp
#include <QApplication> #include "dialog.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); Dialog d; d.setText(argv[0]); d.show(); return a.exec(); }
Downloads