A weird behaviour when I shell:
bush@ubuntu:~/CPPWorkspace/Ex12$ gcc users/dubi/justPrnit.C
Returns an error:
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
But when I change justPrnit.C to justPrnit.c (with little 'c') it compiled successfully.
What's that?
error trying to exec 'cc1plus'
Because .C is assumed to be a C++ source file (cc1plus is the C++ parser backend of GCC - by the way, it seems that your local installation of GCC lacks g++ - are you using the default [incomplete] setup?).
To solve this, use the -x switch to force the language:
gcc -x c users/dubi/justPrnit.C
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With