mardi 23 février 2016

Many questions about the various C++ compilers available to me on OS X

I am having trouble understanding the different compilers that are available to me.

I mainly use Xcode for writing and compiling, and in Xcode's preferences, there are all of these options for C++ compilation:

C++ Language Dialect:

  • C++98[-std=c++98] through C++14[-std=c++14]
  • GNU++98[-std=gnu++98] through GNU++14[-std=gnu++14]

C++ Standard Library:

  • libstdc++ (GNU C++ standard library)
  • libc++ (LLVM C++ standard library with C++11 support)

    1. Can someone explain what exactly all of that ^ is?

    2. I understand that (and correct me if I'm wrong), that apple no longer distributes GCC with Xcode and use Clang instead?

    3. If that were the case, then why does Xcode have the option for GNU C++ standard library? Doesn't GNU make GCC?

    4. What compiler is invoked when I run C++ code in my local terminal with g++ filename.cpp?

    5. Is there any way to make sure that this g++ "compiler" is up to date?

    6. What's the difference between compiling with g++ in the terminal and using Xcode?

    7. Also, what would be the difference if I tried running C++ programs with Clang?

    8. My class requires us to test our programs on the department's server's compiler via ssh from my terminal. The server is a Unix machine and I know that its compiler is GNU's GCC compiler and we also access it using g++. Does this mean that the local g++ in my terminal is also GCC?

edit: Grammar

Aucun commentaire:

Enregistrer un commentaire