Solved

gcc error.. no cpp?

Posted on 1998-11-07
4
547 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
  • 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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é.
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…
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…

785 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