Solved

Can't use C++....

Posted on 1998-09-29
3
199 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 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now