Solved

Can't use C++....

Posted on 1998-09-29
3
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 30 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

695 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