-
Notifications
You must be signed in to change notification settings - Fork 275
Open
Description
Description
I am trying to build RViz2 on Windows using:
- Compiler: MinGW-w64 (GCC ≥ 11.2, C++20)
- GUI Framework: Qt6
- Goal: Generate a standalone
.exefor distribution.
Currently, the official ROS 2 Windows support focuses on MSVC, and there is no clear documentation for MinGW-w64 builds. This makes it difficult for developers who prefer GCC-based toolchains on Windows.
Problem Details
-
Missing MinGW Build Support
- Many ROS 2 packages assume MSVC and require patches for MinGW.
- Example issues:
console_bridgefails with MinGW due todllexportdifferences.- OGRE plugins need manual adjustments.
-
Qt6 Compatibility
- The current
CMakeLists.txtdoes not explicitly enforce Qt6 (defaults to Qt5 in some cases).
- The current
-
Standalone EXE Packaging
- No official guide on bundling:
- Qt6
.dllfiles (viawindeployqt) - MinGW runtime dependencies
- OGRE plugins
- Qt6
- No official guide on bundling:
Requested Changes
-
Add MinGW Build Support
- Provide MinGW-compatible patches for critical dependencies (
console_bridge,rviz_ogre_vendor, etc.). - Document CMake flags for MinGW builds (
-G "MinGW Makefiles").
- Provide MinGW-compatible patches for critical dependencies (
-
Qt6 Modernization
- Update
CMakeLists.txtto explicitly support Qt6 (while maintaining Qt5 backward compatibility).
- Update
-
Standalone EXE Packaging Guide
- Add a
windows/README.mdwith steps to:- Use
windeployqtfor Qt dependencies. - Bundle MinGW runtime
.dllfiles. - Handle OGRE plugin paths.
- Use
- Add a
Example Workaround (Current Approach)
I managed to build RViz2 with MinGW by:
- Manually patching
console_bridge. - Forcing Qt6 in
CMakeLists.txt:find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets OpenGL) - Using
windeployqtfor.dllbundling.
However, this process is fragile and undocumented.
Additional Context
- Why MinGW?
- Some developers prefer GCC toolchains for consistency with Linux.
- MinGW builds may be smaller/faster than MSVC in some cases.
- Why Qt6?
- Qt5 is nearing EOL (2023), and Qt6 offers better performance.
Next Steps
- Can the maintainers officially support MinGW-w64 builds?
- Would a pull request (e.g., Qt6 modernization) be welcome?
- Is there interest in adding a Windows packaging guide?
I’m happy to contribute patches/documentation if this is deemed useful!
Labels (Suggested)
enhancementwindowsbuild systemdocumentation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels