2.Set Compiler setting in Code::Block
(1)Code::Block->Setting->Compiler
(2)create a new compiler setting
(3)Code::Block->Setting->Compiler->Toolchain executables
Compiler's installation directory: director of your qt of installation
chages Program FIles
C compiler :x86_64-w64-mingw32-gcc.exe
C++ compiler :x86_64-w64-mingw32-g++.exe
Link for dynamic libs:x86_64-w64-mingw32-g++.exe
3.create a new Qt5 project
(1) select Qt5 project
(2) set directory:director of your qt of installation
(3) select compiler(its name is the same as ->2.Set Compiler setting in Code::Block)
4. compile & link the project
5.execute the program
(1)copy DDLs from Qt's directory to directory of execution file before running it.
ex. copy D:\Qt\5.12.0\mingw73_64\bin\XXX.dll E:\Projects\CodeBlocks\qt_ex1\bin\Debug
libgcc_s_seh-1.dll
libstdc++-6.dll
libwinpthread-1.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Widgets.dll
(2) run it