LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-02-2011, 09:43 AM   #1
shivi91
LQ Newbie
 
Registered: Mar 2011
Location: india
Posts: 24

Rep: Reputation: 0
Unhappy can't compile my c++ program though i have gcc installed..


i was tring to Compile my c++ program..cme across this problem....but my c programs are getting compilied without any problem.I am using fedora 14.Please assist me what to do.

Below is the way terminal reacted to my program..

gcc prog1.cpp
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-02-2011, 09:50 AM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
You might have C support installed but not C++. Try (as root)

Code:
yum install gcc-c++
probably other packages are missing as well (headers, libraries, etc.) but getting C++ support is a starting point.
 
2 members found this post helpful.
Old 03-02-2011, 10:01 AM   #3
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
and g++ is used for compiling c++ programs, gcc would anyway not work.
 
Old 03-02-2011, 10:53 AM   #4
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by Anisha Kaul View Post
and g++ is used for compiling c++ programs, gcc would anyway not work.
gcc would work, but -lstdc++ would need to be specified as a linker option.
 
1 members found this post helpful.
Old 03-03-2011, 09:01 AM   #5
shivi91
LQ Newbie
 
Registered: Mar 2011
Location: india
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by johnsfine View Post
You might have C support installed but not C++. Try (as root)

Code:
yum install gcc-c++
probably other packages are missing as well (headers, libraries, etc.) but getting C++ support is a starting point.

thanks so much it worked
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile gcc when there is no c compiler installed!? So confused... chuckycharms Linux - Newbie 18 11-17-2009 10:33 AM
Can I use gcc for windows to compile a program for Linux?? webquinty Linux - Newbie 6 11-04-2008 06:16 AM
I've installed the GCC packages but C programs still won't compile! Cold Coffee Linux - Newbie 10 07-14-2006 03:31 AM
Can't compile - GCC/G++ doesn't seem to be properly installed Rexxars Debian 7 03-14-2006 04:46 PM
Can't compile c++ program using gcc pengu Programming 9 02-22-2006 01:59 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration