View Full Version : gcc probs
Vivek788
05-10-2007, 10:26 PM
I get error file or folder not found with any library file i include in my C program.
I am using feisty fawn.
mehulved
05-10-2007, 10:30 PM
Can you give more details. Sounds a bit unclear to me on what exactly are you trying to say. Maybe give an example error message.
QwertyManiac
05-10-2007, 10:31 PM
How did you install GCC?
And also, does giving the entire path help (/usr/include/bits/stdio.h) ?
mehulved
05-10-2007, 10:36 PM
Sometimes some libraries need to be linked while compiling. Maybe that's his problem. I had faced it with the math library.
Vivek788
05-10-2007, 10:44 PM
vivek@vivek-desktop:~/programs$ gcc 1.c
1.c:1:18: error: stdio.h: No such file or directory
1.c: In function ‘main’:
1.c:6: warning: incompatible implicit declaration of built-in function ‘printf’
1.c:7: warning: incompatible implicit declaration of built-in function ‘scanf’
1.c:10:2: warning: no newline at end of file
vivek@vivek-desktop:~/programs$ cat 1.c
#include<stdio.h>
main()
{
int i,y;
char *names[]={"PACIFIC","ATLANTIC"};
printf("Enter number:");
scanf("%d",&i);
printf("%o %x %d",i,i,i);
printf("%c %s",names[1],names[1]);
}vivek@vivek-desktop:~/programs$
[xubz]
05-10-2007, 10:59 PM
Well, Just installing GCC won't do any good. You need to install the Libraries too!
I'd suggest you to install the build-essential Package.
sudo apt-get install build-essential
Edit: On the Lighter note, For a good editor, Try Geany. It kinda supports compile and run by just pressing F5 :)
mehulved
05-10-2007, 11:41 PM
well vi and kate support that too :p
BTW, build-essential package is available in feisty CD. No need to go online to download it.
Vivek788
06-10-2007, 04:48 PM
i installed libc6-dev and prob solved.
mehulved
06-10-2007, 05:01 PM
That's good but still you will be missing a few things specially a C++ compiler and stuff. It would be good to install the full build-essential package.
techram
18-10-2007, 02:08 PM
is it your gcc problem in solaris?
Vivek788
19-10-2007, 03:22 AM
feisty fawn
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.