[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Can't use C++....

Posted on 1998-09-29
3
Medium Priority
?
210 Views
Last Modified: 2013-12-06
I am running Red Hat 5.1. I wrote some code in C++ but when i went to compile it, it said it couldn't find the header files. I checked to see if i had installed them and I did. But the header files are nowhere to be found. Also, when I ran gcc it said it couldnt fing cc1plus. That is also supposed to beinstalled but again its nowhere to be found. any ideas?

0
Comment
Question by:GreatOne
  • 2
3 Comments
 
LVL 2

Expert Comment

by:mlev
ID: 1638173
All header files or just C++ header files?
Did you compile with g++ rather than gcc?
Try "rpm -V glibc-devel libstdc++-devel gcc egcs-c++"
0
 

Author Comment

by:GreatOne
ID: 1638174
Just the C++ header files are missing. I was able to compile it with g++ but I like gcc better. And I typed in that rpm command line. And nothing happened. I tried unintsalling and reinstalling but that did not work either. any more ideas?


0
 
LVL 2

Accepted Solution

by:
mlev earned 60 total points
ID: 1638175
Well, everything is okay then.
Disappointing as it may seem, while you may like gcc better,
g++ is the command to compile C++ programs with. The difference
is in flags. For example, g++ runs the compiler stage with -I/usr/include/g++ (that's where your C++ headers are),
and the linker stage with -lstdc++.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question