![C++ 编译 Ubuntu 20.04 LTS 时出错](https://linux22.com/image/950083/C%2B%2B%20%E7%BC%96%E8%AF%91%20Ubuntu%2020.04%20LTS%20%E6%97%B6%E5%87%BA%E9%94%99.png)
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’ –