PDA

View Full Version : gcc cannot find stdio.h library?


snoman
February 8th, 2006, 04:51 PM
I'm having a slight problem. I recently installed Ubuntu on both my laptop and desktop. Being a fairly proficient programmer in C/C++, I have been writing programs on my desktop and compiling with gcc with no problems.

My problem is, when I try to compile the same code on my laptop, or even just simple programs, gcc chokes and tells me that it cannot find stdio.h. The precise error is "error: stdio.h: No such file or directory". I've tried updating gcc, hoping that that would fix the problem, but it has gotten me nowhere. Anyone have any ideas on how to fix this?

toojays
February 8th, 2006, 05:03 PM
Have you installed the build-essential package?

MartinG
February 8th, 2006, 05:10 PM
I'm having a slight problem. I recently installed Ubuntu on both my laptop and desktop. Being a fairly proficient programmer in C/C++, I have been writing programs on my desktop and compiling with gcc with no problems.

My problem is, when I try to compile the same code on my laptop, or even just simple programs, gcc chokes and tells me that it cannot find stdio.h. The precise error is "error: stdio.h: No such file or directory". I've tried updating gcc, hoping that that would fix the problem, but it has gotten me nowhere. Anyone have any ideas on how to fix this?You need to install the whole tools set, not just gcc. Trysudo apt-get install build-essential

snoman
February 8th, 2006, 05:13 PM
Thanks, that seems to have done the trick.

praveensinha
September 7th, 2008, 12:34 PM
You need to install the whole tools set, not just gcc. Trysudo apt-get install build-essential

:guitar: ihave install ubuntu 8.04 ,iface problum with C & c++ when compile
iget message gcc cannot find stdio.h library:guitar:

mssever
September 7th, 2008, 12:46 PM
:guitar: ihave install ubuntu 8.04 ,iface problum with C & c++ when compile
iget message gcc cannot find stdio.h library:guitar:
Do you still have problems after following the instructions above?

Socrates1013
September 7th, 2008, 01:18 PM
:guitar: sudo apt-get install build-essential

I had to run 'sudo apt-get install update' before that so it would work, just an FYI

mssever
September 7th, 2008, 01:25 PM
I had to run 'sudo apt-get install update' before that so it would work, just an FYI
You mean, "sudo apt-get update", don't you?

Socrates1013
February 2nd, 2010, 09:46 AM
You mean, "sudo apt-get update", don't you?

:DYeah, that was it.:D