Skip to content

MacOS 11.15: error: invalid argument '-std=c++11' not allowed with 'C' #69

@beyarkay

Description

@beyarkay

Nice.

After following the instructions on the docs for compiling from source (I'm looking to contribute) on MacOS, everything was good until the compilation step where I was asked to run:

cmake -DCMAKE_BUILD_TYPE=Release -G"Unix Makefiles" ../src/
make -j3

cmake runs fine, but make -j3 gives the following error:

$ make -j3
Consolidate compiler generated dependencies of target robogen
[  1%] Building CXX object CMakeFiles/robogen.dir/arduino/ArduinoNNCompiler.cpp.o
clang: warning: -O4 is equivalent to -O3 [-Wdeprecated]
[  1%] Building C object CMakeFiles/robogen.dir/brain/NeuralNetwork.c.o
error: invalid argument '-std=c++11' not allowed with 'C'
make[2]: *** [CMakeFiles/robogen.dir/brain/NeuralNetwork.c.o] Error 1
make[1]: *** [CMakeFiles/robogen.dir/all] Error 2
make: *** [all] Error 2

I'm not sure where the argument (-std=c++11) was passed in nor how to solve this issue, although I think it's similar to these:

Thanks for any help you can provide!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions