LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-03-2015, 09:15 AM   #1
StuartK24
Member
 
Registered: Jan 2010
Location: Melbourne, Australia
Distribution: MX 18.3
Posts: 32

Rep: Reputation: 2
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.
 
Old 04-03-2015, 09:43 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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
 
Old 04-03-2015, 10:00 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,863
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
install something like 'libc-dev' or 'glibc-devel' or 'libc6-development'... there should be some user-friendly GUI feature, too.
 
Old 04-03-2015, 02:07 PM   #4
SoftSprocket
Member
 
Registered: Nov 2014
Posts: 399

Rep: Reputation: Disabled
sudo apt-get install build-essential
 
1 members found this post helpful.
Old 04-20-2015, 07:36 AM   #5
StuartK24
Member
 
Registered: Jan 2010
Location: Melbourne, Australia
Distribution: MX 18.3
Posts: 32

Original Poster
Rep: Reputation: 2
Thanks to everyone who replied. Thank you SoftSprocket, build essential installed gcc and g++.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot get pianobar 2014.6.08 to compile in Mint jteuban Linux - Software 3 07-23-2014 04:51 AM
linux mint 64bit package required to compile 32bit nasm code jdubya Linux - Newbie 10 11-07-2013 11:01 AM
GTK+-3.0-dev No Such File Or Directory on compile (Linux Mint/gcc) NeXuS_2006 Programming 7 07-24-2013 08:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration