LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Can't compile C in Linux Mint 17 (https://www.linuxquestions.org/questions/programming-9/cant-compile-c-in-linux-mint-17-a-4175538654/)

StuartK24 04-03-2015 09:15 AM

Can't compile C in Linux Mint 17
 
I've been writing and compiling C for a number of years on an old machine in a Unix emulation, cygwin, and in Linux in an installation of Mandrake 10.1. Now I have Linux Mint installed on my laptop, but when I try to compile C I get the following message:

trial.c:3:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.

The gcc compiler is installed. Is there a path variable I need to set somewhere so the compiler can find the header file, or do I need to install the header files in a separate package? If so, I've never had to do this previously.
Any help would be appreciated. I haven't been able to find an answer on the net so far.

knudfl 04-03-2015 09:43 AM

For full gcc functionality : $ sudo apt-get install g++
... which will also install all the gcc dependencies.
I.e. libc6-dev, linux-libc-dev, etc. :

/usr/include/i386-linux-gnu/bits/stdio.h

NevemTeve 04-03-2015 10:00 AM

install something like 'libc-dev' or 'glibc-devel' or 'libc6-development'... there should be some user-friendly GUI feature, too.

SoftSprocket 04-03-2015 02:07 PM

sudo apt-get install build-essential

StuartK24 04-20-2015 07:36 AM

Thanks to everyone who replied. Thank you SoftSprocket, build essential installed gcc and g++.


All times are GMT -5. The time now is 03:37 PM.