I want to compile a C++ program in Arch Linux, but there's no "g++" package as there is in Ubuntu repositories for example.
Using -x too won't work. like this:
gcc -x c++ -o myprog myprog.cpp
I want to compile a C++ program in Arch Linux, but there's no "g++" package as there is in Ubuntu repositories for example.
Using -x too won't work. like this:
gcc -x c++ -o myprog myprog.cpp
gcc is both a C and C++ compiler.
It will look at the file's extension and process accordingly.
g++ is only a wrapper that calls gcc
g++ is installed with the gcc package in Arch
gcc file.C # uppercase .C (or .cpp) will process as C++
gcc file.c # lowercase .c will process as C