What is the difference between g++ and gcc?

后端 未结 10 2168
无人共我
无人共我 2020-11-22 00:34

What is the difference between g++ and gcc? Which one of them should be used for general c++ development?

10条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 01:06

    For c++ you should use g++.

    It's the same compiler (e.g. the GNU compiler collection). GCC or G++ just choose a different front-end with different default options.

    In a nutshell: if you use g++ the frontend will tell the linker that you may want to link with the C++ standard libraries. The gcc frontend won't do that (also it could link with them if you pass the right command line options).

提交回复
热议问题