Skip to content

build(windows): fix MinGW-w64 compilation (hardcoded paths, 64-bit type errors) - #24

Open
esmaeilireza wants to merge 3 commits into
SCADACS:masterfrom
esmaeilireza:fix/mingw64-build
Open

build(windows): fix MinGW-w64 compilation (hardcoded paths, 64-bit type errors)#24
esmaeilireza wants to merge 3 commits into
SCADACS:masterfrom
esmaeilireza:fix/mingw64-build

Conversation

@esmaeilireza

Copy link
Copy Markdown

Summary
Fixes compilation of the core library with modern MinGW-w64 toolchains (MSYS2, GCC 16.x):

Removes hardcoded -L library paths across all MinGW Makefiles (build/windows/MinGW32, build/windows/MinGW64)
Resolves uint type errors under 64-bit GCC (src/core/s7_server.cpp/.h)
Adds missing include and pins the C++ standard to gnu++14 (src/sys/snap_platform.h)
Testing
Compiled cleanly with MSYS2 MinGW-w64 GCC 16.2.0 (make in build/windows/MinGW64) — no errors, no API changes
The compiled snap7.dll was used in a live client–server session (Python snap7 client against the SCADACS mock server): connect, cyclic DB reads, and setpoint writes all functional
Notes
While testing the library, I built a small open-source PySide6 diagnostic HMI on top of Snap7 (not proposed for inclusion here, just for reference): https://github.com/esmaeilireza/snap7-qt-monitor

Feedback on these build fixes is welcome.

REM added 3 commits September 7, 2026 04:15
- Unify MINGW detection to dynamic shell expansion in all 5 Makefiles
- Remove -L"$(MINGW)/x86_64-w64-mingw32/lib" to avoid nonexistent paths
- Linker finds system libs from default search paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant