Skip to content
This repository was archived by the owner on Aug 31, 2026. It is now read-only.
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

Description

@colinbourassa

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions