Error Stdio.h No Such File Or Directory Ubuntu
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or fatal error stdio.h no such file or directory #include stdio.h ^ compilation terminated posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss fatal error: stdio.h: no such file or directory mac Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only stdio.h no such file or directory linux mint takes a minute: Sign up Unable to compile simple c program in Linux Mint 15 up vote 7 down vote favorite 5 I am a Linux Mint 15 User. i wanted to write simple program in C. Below is my
Fatal Error Stdio.h No Such File Or Directory Cross Compile
code.(hw.c) #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site fatal error stdio.h no such file or directory windows About Us Learn more about Stack Overflow the company Business Learn more about
Stdalign.h: No Such File Or Directory
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join
Fatal Error: Stdio.h: No Such File Or Directory Arm
the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up arm-linux-gnu-gcc fatal error: stdio.h: http://stackoverflow.com/questions/19500018/unable-to-compile-simple-c-program-in-linux-mint-15 No such file or directory up vote 2 down vote favorite These are the files in /usr/bin [root@xilinx bin]# ls -ld arm* -rwxr-xr-x. 1 root root 691752 Feb 5 2013 arm-linux-gnu-addr2line -rwxr-xr-x. 1 root root 721416 Feb 5 2013 arm-linux-gnu-ar -rwxr-xr-x. 1 root root 1297632 Feb 5 2013 arm-linux-gnu-as -rwxr-xr-x. 1 root root 689168 Feb 5 2013 arm-linux-gnu-c++filt -rwxr-xr-x. 1 root root 545664 Feb 6 2013 http://stackoverflow.com/questions/23011367/arm-linux-gnu-gcc-fatal-error-stdio-h-no-such-file-or-directory arm-linux-gnu-cpp -rwxr-xr-x. 1 root root 34176 Feb 5 2013 arm-linux-gnu-elfedit -rwxr-xr-x. 1 root root 544624 Feb 6 2013 arm-linux-gnu-gcc -rwxr-xr-x. 1 root root 214400 Feb 6 2013 arm-linux-gnu-gcov -rwxr-xr-x. 1 root root 760640 Feb 5 2013 arm-linux-gnu-gprof -rwxr-xr-x. 2 root root 1177528 Feb 5 2013 arm-linux-gnu-ld -rwxr-xr-x. 2 root root 1177528 Feb 5 2013 arm-linux-gnu-ld.bfd -rwxr-xr-x. 1 root root 704672 Feb 5 2013 arm-linux-gnu-nm -rwxr-xr-x. 1 root root 875456 Feb 5 2013 arm-linux-gnu-objcopy -rwxr-xr-x. 1 root root 1096992 Feb 5 2013 arm-linux-gnu-objdump -rwxr-xr-x. 1 root root 721456 Feb 5 2013 arm-linux-gnu-ranlib -rwxr-xr-x. 1 root root 389040 Feb 5 2013 arm-linux-gnu-readelf -rwxr-xr-x. 1 root root 693608 Feb 5 2013 arm-linux-gnu-size -rwxr-xr-x. 1 root root 691648 Feb 5 2013 arm-linux-gnu-strings -rwxr-xr-x. 1 root root 875456 Feb 5 2013 arm-linux-gnu-strip I am following this tutorial to cross compile a simple C program: /* myinit.c * Build instructions: * ${CROSS_COMPILE}gcc -static init.c -o init * */ #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more http://unix.stackexchange.com/questions/179778/fatal-error-stdio-h-no-such-file-or-directory-while-compiling-a-c-file about hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. http://www.spiration.co.uk/post/1291/ubuntu:%20error:%20stdio.h:%20No%20such%20file%20or%20directory Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top “fatal error: stdio.h : No such file or no such directory” while compiling a C file [closed] up vote 0 down vote favorite Trying to compile following code in terminal i got root@debian:/home/mz2/Documentos# LANG=C ./soma.c ./soma.c: line 2: syntax error near unexpected token `(' ./soma.c: line 2: `int soma (int a, int b);' The file soma.c is #include < stdio.h > int soma (int a, int b); int main (int argc, char **argv) { int x, y, z; x = 10; y = 12; z = soma(x, y); fprintf(stdout, no such file "A soma de %d com %d é %d\n", x, y, z); return 0; } int soma (int a, int b) { return (a + b); } When I run root@debian:/home/mz2/Documentos# LANG=C gcc -o soma soma.c soma.c:1:21: fatal error: stdio.h : No such file or directory compilation terminated. And... root@debian:/home/mz2/Documentos# LANG=C gcc -Wall -Wextra -pedantic -o soma soma.c soma.c:1:21: fatal error: stdio.h : No such file or directory compilation terminated. How can I fix this and run it? compiling c share|improve this question edited Jan 18 '15 at 22:05 Braiam 16.9k955100 asked Jan 18 '15 at 21:38 Vitor Mazuco 3943822 closed as off-topic by Braiam, jimmij, Faheem Mitha, John WH Smith, jasonwryan Jan 19 '15 at 0:38 This question appears to be off-topic. The users who voted to close gave this specific reason:"Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Braiam, Faheem Mitha, John WH Smith, jasonwryanIf this question can be reworded to fit the rules in the help center, please edit the question. Your title didn't match your question: you didn't even try to run gcc. –Gilles Jan 18 '15 at 21:46 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted You have to compile it; as in: gcc -o soma soma.c Then
would be able to compile a basic C program on any linux box - I mean unices are useful like that, right? So I was a bit surprised when I decided to compile a bit of C just now (in fact Christian Wolff's neat little mp3cut tool) and was faced with the following errors:
chris@snackerjack-lx:/usr/src/mp3cut-0.8$ make gcc -o mp3cut mp3cut.c mp3cut.c:25:19: error: stdio.h: No such file or directory mp3cut.c:26:20: error: stdlib.h: No such file or directory mp3cut.c:27:20: error: string.h: No such file or directory mp3cut.c:28:20: error: unistd.h: No such file or directory ..etc .. etcSo what kind of unix comes with make and a compiler, but none of the required dev libraries and headers required to make any normal C program work? Well a brief google yielded the following solution.. Yup, you guessed it.. you need to install a dev package:
sudo apt-get install build-essentialExcuse my rant, but if it's so 'essential', then why isn't it installed as part of the core system? I find that kinda weird. Anyway, problem fixed and C-sources are now compiling. christo follow me on twitter: http://twitter.com/planet_guru comment Mohamed Chehab 2008-03-21 20:02:29 Thank you. Somehow I assumed that I would be able to compile a basic C program on any linux box - I mean unices are useful like that, right? So I was a bit surprised when I decided to compile a bit of C just now (in fact Christian Wolff's neat little mp3cut tool) and was faced with the following errors:
chris@snackerjack-lx:/usr/src/mp3cut-0.8$ make gcc -o mp3cut mp3cut.c mp3cut.c:25:19: error: stdio.h: No such file or directory mp3cut.c:26:20: error: stdlib.h: No such file or directory mp3cut.c:27:20: error: string.h: No such file or directory mp3cut.c:28:20: error: unistd.h: No such file or directory ..etc .. etcSo what kind of unix comes with make and a compiler, but none of the required dev libraries and headers required to make any normal C program work? Well a brief google yielded the following solution.. Yup, you guessed it.. you need to install a dev package:
sudo apt-get install build-essentialExcuse my rant, but if it's so 'essential', then why isn't it installed as part of the core system? I find that kinda weird. Anyway, problem fixed and C-sources are now compiling. christo Funny, you have over 27,000 views and no replies. I just wanted to say thank you (almost 2 years after you post). As a newbie to Ubuntu, I needed this. H2H.BlAzCoW