Build Instructions¶
Requirements¶
| Tool | Version | Notes |
|---|---|---|
| Qt | 6.10.2 | MinGW 64-bit |
| MinGW-w64 | GCC 15.2.0+ | |
| Git | 2.x | Optional |
Project Configuration¶
The project uses qmake with OpenFOAMGUI.pro:
QT += core gui widgets svgwidgets
CONFIG += c++17 console
mingw {
QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,windows -mthreads
}
TARGET = OpenFOAMGUI
TEMPLATE = app
- Qt modules: Core, GUI, Widgets, SvgWidgets
- C++ standard: C++17 with GNU extensions (
-std=gnu++1z) - Linker:
-Wl,-subsystem,windowssuppresses console window
Command-Line Build (Windows)¶
# Set up environment
export PATH="D:/Qt/6.10.2/mingw_64/bin:$PATH"
export PATH="D:/mingw64/bin:$PATH"
# Navigate to project
cd OpenFOAMGUI
# Generate Makefile
qmake OpenFOAMGUI.pro
# Build (Release)
mingw32-make -f Makefile.Release
# Output: release/OpenFOAMGUI.exe
Build Targets¶
mingw32-make -f Makefile.Release # Release build (-O2)
mingw32-make -f Makefile.Debug # Debug build (-g)
mingw32-make -f Makefile.Release clean # Clean artifacts
Compiler Flags (Release)¶
-O2 -std=gnu++1z -Wall -Wextra -fexceptions -mthreads
-DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1
Linker¶
Linked Libraries¶
Qt Creator Build¶
- Open Qt Creator
- File → Open File or Project... → select
OpenFOAMGUI.pro - Select the MinGW 64-bit kit (Qt 6.10.2)
- Choose Release configuration
- Build → Build Project (
Ctrl+B)
Deployment¶
For standalone distribution, use windeployqt:
This copies all required Qt DLLs and plugins. The qt.conf file ensures plugins are found: