You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 31, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 31, 2026. It is now read-only.
std=c++03 flag not supported by some versions of g++ #156
Red Hat Enterprise Linux 6.9
g++ 4.4.7
CMake 3.4.1
Ruby 2.4.2
Qt 4.6.2
The native extension fails to build with the above configuration. Specifically, the try_run() call in ext/smoke/qtcore/QtGuess.txt fails, and the subsequent if() check fails because the qdefines_run variable is never created.
I traced the problem to the explicit compiler flag -std=c++03 added by ext/CMakeLists.txt. Some versions of g++ (including 4.4.7) do not support this standard. Most recommendations that I've found suggest switching to -std=c++98. I tested this by modifying ext/CMakeLists.txt and verified that the native extension build completed successfully when using the c++98 standard.
Red Hat Enterprise Linux 6.9
g++ 4.4.7
CMake 3.4.1
Ruby 2.4.2
Qt 4.6.2
The native extension fails to build with the above configuration. Specifically, the
try_run()call inext/smoke/qtcore/QtGuess.txtfails, and the subsequentif()check fails because theqdefines_runvariable is never created.I traced the problem to the explicit compiler flag
-std=c++03added byext/CMakeLists.txt. Some versions of g++ (including 4.4.7) do not support this standard. Most recommendations that I've found suggest switching to-std=c++98. I tested this by modifyingext/CMakeLists.txtand verified that the native extension build completed successfully when using the c++98 standard.