Menu

Build error with GCC

2023-05-21
2023-05-22
  • Paolo DePetrillo

    I was getting an error trying to build the latest with GCC. The problem is in CMakeLists.txt here:

    if(CMAKE_COMPILER_IS_GNUCXX)
      message(STATUS "Using a g++ compiler variant --- additional compiler warnings turned on")
      add_definitions(-Wall -W -Wno-unused-local-typedefs -std=c++11)
    endif(CMAKE_COMPILER_IS_GNUCXX)
    

    Removing -std=c++11 fixes it.

     
    • Frans van den Bergh

      That's interesting! Which OS / platform ?

      But I can see how this clashes with the later c++ standard specification in the cmake file, so I've removed the -std=c++11 flag.

      Thanks for reporting this!

       
      • Paolo DePetrillo

        Arch Linux with gcc 13.1.1 and cmake 3.26.3.

         

Log in to post a comment.

MongoDB Logo MongoDB