On 12-Jan-04 Bryce Martin wrote:
Hi, I am trying to compile a very simple C program but the commands I use are not working. eg $ gcc firstCProgram.c or $ cc firstCProgram.c bash: command gcc/cc not found
I seem to have some sort of c compiler on my system in the directory /usr/lib/gcc-lib/i586-suse-linux/3.3.1/cc1
Am I right in thinking this is a c compiler that I can use to compile my C programs? If yes, then how can I set the path so that it will work from the command line whenever I want to compile? I'm using SuSE 9.0. If this is not a C compiler after all, please tell me so and I'll install one.
Hi Bruce,
the C compiler gcc (cc is a symbolic link to gcc) should be at /usr/bin/gcc and cc at /usr/bin/cc.
So check whether these files exist. If not, then you need to install gcc/cc. You should find it under the "development" group of packages. Also check out whether you only need the "basic" gcc install, or whether you also need (or would like to have) any "extras" from the "development" set.
The files under /usr/lib/gcc-lib/i586-suse-linux/3.3.1 will be dynamically linkable library nodules from the C compiler which some installed programs will need to have available in order to run.
If you don't have gcc as a binary executable in its own right, you won't be able to compile any C program.
(I'm a bit surprised gcc was not installed by default. Time was when it was assumed that anyone running Linux would neeed it!)
I hope this helps, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 167 1972 Date: 12-Jan-04 Time: 21:33:52 ------------------------------ XFMail ------------------------------