I want to compile a C++ program in Arch Linux, but there's no "g++" package as there is in Ubuntu repositories for example.
-x too won't work. like this:
gcc -x c++ -o myprog myprog.cpp
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
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