Problem: QtCreator debug works but release not work
Problem: QtCreator generated executable binary won't run on its own
LIBWINPTHREAD-1.DLL LIBGCC_S_DW2-1.DLL LIBSTDC++-6.DLL
QtCore (correct version) QtGui (QtWidgets as well if version 5)
Problem: QtCreator build release error HostX86\x64\cl.exe“ is used by qmake but HostX64\x64\cl.exe” is configured in the kit.
#include "QApplication.h" // note: in for Qt stuff, you can also use #include <QApplication> format #include "QLabel.h" //#include <QtWidgets> // note: use this in Qt5, <QtGui> in Qt4, with this, //with above line, you don't need include each single element, just like in Python int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel *info_label = new QLabel("Hello Qt!"); info_label->show(); return app.exec(); }
g++ -o Pure PureSrc.cpp
g++ -o PureStatic -static PureSrc.cpp
g++ -o PureStaticSmall -s -Os -static PureSrc.cpp
Python Example vs C++ Example
|
|
Intro to Portable
Tools You Need
Files You need
QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TEMPLATE = app TARGET = MyBox INCLUDEPATH += . # Input HEADERS += mybox.h SOURCES += main.cpp mybox.cpp
Environment setting You Need
set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; set PATH=%PATH%;D:\z_sys\App_Dev\Qt\Qt5.7.1\5.7\mingw53_32\bin; set PATH=%PATH%;D:\z_sys\App_Dev\Qt\Qt5.7.1\Tools\mingw530_32\bin; qmake %~n0.pro mingw32-make pause
Check and Test Build result in release folder
set PATH=D:\Dev\CPP_Qt\_Library_Qt;%PATH% %~n0.exe