What is the difference? clang++ | clang -std=c++11

前端 未结 2 2081
执笔经年
执笔经年 2020-12-13 04:15

I had been erroneously using this command, which failed at the link step:

$ clang -std=c++11 -stdlib=libc++ myInputFile.cpp

Can anyone e

2条回答
  •  醉话见心
    2020-12-13 04:47

    Clang is the name of the whole compiler.

    However, from a command-line point of view:

    • Clang is the C compiler
    • Clang++ is the C++ compiler (like g++ is a C++ compiler, whereas gcc is a C compiler)

    The -std=c++11 option enables the new C++11 standard (as in g++).

提交回复
热议问题