build(windows): fix MinGW-w64 compilation (hardcoded paths, 64-bit type errors) - #24
Open
esmaeilireza wants to merge 3 commits into
Open
build(windows): fix MinGW-w64 compilation (hardcoded paths, 64-bit type errors)#24esmaeilireza wants to merge 3 commits into
esmaeilireza wants to merge 3 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.