Building issue on Linux CentOS

Issue #13 new
Juan Carlos Rueda
created an issue

when i ran cmake . i got the following output:

cmake . -- The C compiler identification is GNU 4.4.7 -- The CXX compiler identification is GNU 4.4.7 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Performing Test COMPILER_SUPPORTS_CXX11 -- Performing Test COMPILER_SUPPORTS_CXX11 - Failed -- Performing Test COMPILER_SUPPORTS_CXX0X -- Performing Test COMPILER_SUPPORTS_CXX0X - Success -- Found BISON: /usr/bin/bison (found version "2.4.1") -- Found FLEX: /usr/bin/flex (found version "2.5.35") CMake Warning (dev) at CMakeLists.txt:48 (add_executable): Policy CMP0037 is not set: Target names should not be reserved and should match a validity pattern. Run "cmake --help-policy CMP0037" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

The target name "test" is reserved or not valid for certain CMake features, such as generator expressions, and may result in undefined behavior. This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done -- Generating done -- Build files have been written to: /apps/Dev/tunnuz-json-eda962157078

when i try to execute the make command i got the following errors:

Scanning dependencies of target json [ 16%] Building CXX object CMakeFiles/json.dir/json_st.cc.o In file included from /apps/Dev/tunnuz-json-eda962157078/json_st.cc:1: /apps/Dev/tunnuz-json-eda962157078/json_st.hh:258: error: solamente las declaraciones de constructores pueden ser 'explicit' /apps/Dev/tunnuz-json-eda962157078/json_st.hh:261: error: solamente las declaraciones de constructores pueden ser 'explicit' /apps/Dev/tunnuz-json-eda962157078/json_st.hh:264: error: solamente las declaraciones de constructores pueden ser 'explicit' /apps/Dev/tunnuz-json-eda962157078/json_st.hh:267: error: solamente las declaraciones de constructores pueden ser 'explicit' make[2]: [CMakeFiles/json.dir/json_st.cc.o] Error 1 make[1]: [CMakeFiles/json.dir/all] Error 2 make: *** [all] Error 2

Comments (1)

  1. Tommaso Urli repo owner

    Hi Juan Carlos, the error you're seeing is because of a version of the compiler which doesn't support C++11. In other words, in order to compile JSON++ you should update your compiler. The issue is described here. You should get an error during the build with CMake, but at sometime the support for C++0x was added (I guess with a pull request which I overlooked), and now the build checks pass even if C++11 is not supported. I'm going to fix this now.

    Best, Tommaso

  2. Log in to comment