By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

g++: error trying to exec 'cc1plus': execvp: No such file or directory

P: 4
I'm on a MacBook running mac osx 10.4.11, I have Xcode, gnu, and I'm using the terminal command: g++ -o helloworld helloworld.c

I get the error:
g++: error trying to exec 'cc1plus': execvp: No such file or directory

What does this error mean?

Thanks,
Dan
Jul 13 '08 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 849
A .c file is C source code. If you're writing C++ code, end it with .cpp instead.
Jul 13 '08 #2

gpraghuram
Expert 100+
P: 1,275
You can compile a .c file using g++.
I think the installation is not fine or some required components are missing.

Raghu
Jul 14 '08 #3

Expert 10K+
P: 11,448
I'm on a MacBook running mac osx 10.4.11, I have Xcode, gnu, and I'm using the terminal command: g++ -o helloworld helloworld.c

I get the error:
g++: error trying to exec 'cc1plus': execvp: No such file or directory

What does this error mean?
It means that your shell could find the g++ frontend of the GNU compiler but that
frontend couldn't find cc1plus, the actual C++ compiler; it could find cpp, the
preprocessor, it already ran. Go to the directory where the g++ frontend is stored
(type: "which g++") and look for the file cc1plus in that same directory or a sub-
directory thereof. If it isn't there your compiler installation is broken; if it is there
some configuration of it went berzerk.

Are you able to compile ordinary C files using 'gcc'?

kind regards,

Jos
Jul 14 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.