Giter VIP home page Giter VIP logo

Comments (4)

Tobias-Fischer avatar Tobias-Fischer commented on August 20, 2024 2

Simply adding set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") to CMakeLists.txt solves this issue. I cannot find a branch for kinetic and newer, where C++11 is a minimum requirement (http://www.ros.org/reps/rep-0003.html#kinetic-kame-may-2016-may-2021), so I can't / don't want to open a pull request for this.

from image_common.

NikolausDemmel avatar NikolausDemmel commented on August 20, 2024 1

@Tobias-Fischer, yeah, that should work around the issue, but it is still unclear to me what a "clean" solution is.

Firstly, adding this to the CMakeLists.txt has some issues:

  1. If you compile your workspace with catkin_cmake, that setting applies to all packages, if you use catkin_tools, it only applies to this one package.
  2. If you use a compiler that has C++14 or newer by default, this setting is a "downgrade".
  3. ...

Other unclear question: Do we need users of image_common to also compile with C++11, or is it fine for them to stick with an older standard?

Maybe the best approach would be to find a clean way to "compile the whole workspace with C++11" for OSX users and add that to the install instructions.

Some previous discussion:

from image_common.

smnogar avatar smnogar commented on August 20, 2024

Yep, I'm getting the same thing.

from image_common.

NikolausDemmel avatar NikolausDemmel commented on August 20, 2024

For the record, I've had success with passing additionally setting -DCMAKE_CXX_STANDARD=14 in catkin config to compile lunar on macos Sierra (10.12).

from image_common.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.