qtbindings
qtbindings copied to clipboard
std=c++03 flag not supported by some versions of g++
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.