C++ 编译 Ubuntu 20.04 LTS 时出错

C++ 编译 Ubuntu 20.04 LTS 时出错
c++: error: unrecognized command line option ‘-GR’; did you mean ‘-R’?
c++: error: unrecognized command line option ‘-EHsc’
c++: error: unrecognized command line option ‘-Zm200’
c++: error: unrecognized command line option ‘-nologo’
c++: error: unrecognized command line option ‘-std:c++17’; did you mean ‘-std=c++17’?

来自评论:


c++: error: unrecognized command line option ‘-GR’; did you mean ‘-R’?
c++: error: unrecognized command line option ‘-EHsc’
c++: error: unrecognized command line option ‘-Zm200’ c++: error: unrecognized command line option ‘-nologo’
c++: error: unrecognized command line option ‘-std:c++17’; did you mean ‘-std=c++17’?
make[2]: *** [CMakeFiles/exampleED.dir/build.make:63: CMakeFiles/exampleED.dir/exampleED.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:104: CMakeFiles/exampleED.dir/all] 
Error 2 make: *** [Makefile:130: all] Error 2 – 
emil@DESKTOP-MTLDFE4:~/projects/session2_solution/build$ cmake . -- Configuring done --
Generating done -- Build files have been written to: /home/emil/projects/session2_solution/build emil@DESKTOP-MTLDFE4:~/projects/session2_solution/build
$ make [ 16%] Building CXX object CMakeFiles/exampleED.dir/exampleED.cc.o c++:
error: unrecognized command line option ‘-GR’; did you mean ‘-R’? c++: 
error: unrecognized command line option ‘-EHsc’ c++:
error: unrecognized command line option ‘-Zm200’ c++:
error: unrecognized command line option ‘-nologo’ –

相关内容