LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Compiling using gcc (https://www.linuxquestions.org/questions/mandriva-30/compiling-using-gcc-267286/)

Damitha 12-17-2004 12:19 AM

Compiling using gcc
 
Hi all

This is what I get when I try to compile a c++ program

[dam@localhost dam]$ gcc-$(gcc3.4-version) hello.cpp -oh
gcc-3.4.1: installation problem, cannot exec `cc1plus': No such file or directory

[dam@localhost dam]$ g++ hello.cpp -ohello
bash: g++: command not found

And when I installed the 3.4.1 version I got this error

Some package requested cannot be installed:gcc-c++-3.4.3-1mdk.i586 (due to unsatisfied libstdc++6[== 3.4.3]) do you agree ?

Well I ignored it and installed.......

What am I suuppose to do about this I've tried so many things and searced the ner like nothing And "http://www.linuxfromscratch.org/blfs/view/cvs/general/gcc.html" said I'll be needing some one Gig or so

pls some one help me.

rjlee 12-17-2004 05:11 AM

Re: Compiling using gcc
 
Quote:

Originally posted by Damitha
[dam@localhost dam]$ gcc-$(gcc3.4-version) hello.cpp -oh
gcc-3.4.1: installation problem, cannot exec `cc1plus': No such file or directory

[dam@localhost dam]$ g++ hello.cpp -ohello
bash: g++: command not found

And when I installed the 3.4.1 version I got this error

Some package requested cannot be installed:gcc-c++-3.4.3-1mdk.i586 (due to unsatisfied libstdc++6[== 3.4.3]) do you agree ?

cc1plus and libstdc++6 is a vital part of your GCC installation, so basically you need to reinstall GCC. You will not be able to compile C++ programs without these.

I'm not sure exactly what cc1plus does; I think it's some sort of c++-capable preprocessor. But you do want to be using g++ or c++, not gcc or cc, to compile a c++ source file.

Libstdc++6 is the standard c++ libraries, without which you are unlikely to be able to get a c++ program to do very much that's useful. You need this for things like termainal, network and file I/O, as well as for basic data-types like strings, lists and tables.

The bottom line is that your g++ install is broken. You need to fix it by resolving its dependencies; i.e. installing the parts that you missed, or correcting the PATH so that you can actually find them.


All times are GMT -5. The time now is 05:45 AM.