Solved

gcc error.. no cpp?

Posted on 1998-11-07
4
554 Views
Last Modified: 2010-04-20
i get this when i try to run gcc:
gcc: installation problem, cannot exec `cpp': No such file or directory  
it was working fine before.. what do i need to do?
thanks..
0
Comment
Question by:Vickio
[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
  • 2
4 Comments
 

Accepted Solution

by:
jji earned 70 total points
ID: 1638450
from "man gcc":
.
LIBDIR/cpp         preprocessor
.
LIBDIR is usually /usr/local/lib/machine/version.


So it seems like you have somehow lost your copy of cpp. Try
`locate cpp|grep lib`, if you find it somewhere put the path
to your /etc/ld.so.conf and run `ldconfig -v`.
(Or you could re-install gcc.....)
0
 

Author Comment

by:Vickio
ID: 1638451
it didnt find cpp, so i reinstalled gcc (or tried to at least) and now it will compile a c file  no problem but when i tried a simple c++ file (that just printed some text) i got this:

In file included from /usr/include/g++/iostream.h:31,
                 from test.cc:1:
/usr/include/g++/streambuf.h:403: warning: invalid type `void *' for default argument to `ios *'
In file included from test.cc:1:
/usr/include/g++/iostream.h:50: warning: invalid type `void *' for default argument to `ostream *'
/usr/include/g++/iostream.h:123: warning: invalid type `void *' for default argument to `ostream *'
/usr/include/g++/iostream.h:230: warning: invalid type `void *' for default argument to `ostream *'
/tmp/cca011651.o: In function `main':
/tmp/cca011651.o(.text+0x9): undefined reference to `cout'
/tmp/cca011651.o(.text+0xe): undefined reference to `ostream::operator<<(char const *)'  

so now what?
0
 

Expert Comment

by:jji
ID: 1638452
It seems like you don´t have libraries around or you didn´t
include them properly....
Did you compile it with g++? (g++ test.cc) If not it sure
will do something like that.
Try with g++ and if got no luck throw the code here.
0
 

Author Comment

by:Vickio
ID: 1638453
ok, got it working now.
thanks.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
RHEL 6.7 Gnome Desktop on VMware 6 VM 9 142
Install XRDP on Ubuntu Server 16.10 x64 3 119
postfix start error! 9 86
Linux kernel panic ext3-fs error 14 77
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

751 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