LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-07-2009, 11:00 AM   #1
somdeb
LQ Newbie
 
Registered: Apr 2009
Location: India
Distribution: Debian 4.0r4
Posts: 4

Rep: Reputation: 0
gcc 4:4.1.1-15 (Debian 4.0 r4a_Etch) cannot find include files. No man pages.


hi,
I have recently installed gcc on my box.

however:
1. Man pages do not seem to have been installed / set up correctly.
man gcc returns not found.

2. code cannot be compiled as header files seem to be not found.

please help.


The Code :
Code:
#include <stdio.h>
int main()
{
	printf("Hello world\n");
	return 0;
}
Compilation :
Code:
roy@somdeb:~/shacles/comp$ gcc -o hello -c hello.c
hello.c:1:19: error: stdio.h: No such file or directory
hello.c: In function ‘main’:
hello.c:4: warning: incompatible implicit declaration of built-in function ‘printf’
Installed files as listed by synaptic
Code:
/.
/usr
/usr/bin
/usr/bin/c89-gcc
/usr/bin/c99-gcc
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/c99-gcc.1.gz
/usr/share/man/man1/c89-gcc.1.gz
/usr/share/doc
/usr/share/doc/cpp
/usr/bin/gcov
/usr/bin/gccbug
/usr/bin/i486-linux-gnu-gcc
/usr/bin/gcc
/usr/share/man/man1/gccbug.1.gz
/usr/share/doc/cpp/README.Bugs
/usr/share/doc/cpp/FAQ.gz
/usr/share/doc/gcc
Thanks,
somdeb
 
Old 05-07-2009, 11:27 AM   #2
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
from the available options to obtain this file.. http://packages.debian.org/search?se...table&arch=any
I would recommend trying libc6-dev first

aptitude install libc6-dev


had you installed the metapackage build-essential to setup your compile environment i think you would have got libc6-dev automatically.. jsut fyi.
http://packages.debian.org/lenny/build-essential
 
Old 05-07-2009, 11:39 AM   #3
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,776

Rep: Reputation: Disabled
For the documentation, install the gcc-doc and gcc-doc-base packages.
cheers,
jdk
 
Old 05-07-2009, 12:23 PM   #4
somdeb
LQ Newbie
 
Registered: Apr 2009
Location: India
Distribution: Debian 4.0r4
Posts: 4

Original Poster
Rep: Reputation: 0
@farslayer:

just Installed libc6-dev. It compiles fine now. Thank you.



@jdkaye

Downloaded and installed

gcc-doc_2_i386
gcc-4.3-doc_4.3.2.nf1-1_all
gcc-doc-base_4.3.2.nf1-1_all

Could access the man pages now. Thank you.


1. I wonder why the above doc packages were not listed by Synaptic under
available packages -- are they not standard part of the distro?

2. How may i go about installing packages downloaded from the Internet using Synaptic. I had to install the above using "Gdebi" one by one
in order of their dependencies ?

Thanks and regards

Somdeb
 
Old 05-07-2009, 01:20 PM   #5
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Synaptic probably lists them under documentation or some such,.. who knows ?
I can never find anything in the synaptic GUI that I can't locate using the command line 50 times faster..The command line is so much easier..

Code:
it-lenny:~# aptitude search gcc | grep doc

p   gcc-4.1-doc                     - documentation for the GNU compilers (gcc, 
p   gcc-4.2-doc                     - documentation for the GNU compilers (gcc, 
p   gcc-4.3-doc                     - documentation for the GNU compilers (gcc, 
p   gcc-doc                         - documentation for the GNU compilers (gcc, 
p   gcc-doc-base                    - several GNU manual pages      

it-lenny:~# aptitude install gcc-doc gcc-doc-base gcc-4.3-doc
http://algebraicthunk.net/~dburrows/.../rn01re01.html


Wierd Synaptic shows them under Documentation (Contrib) and Documentation (non-free) do you have contrib and non-free in your sources.list ?

Last edited by farslayer; 05-07-2009 at 01:24 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Need help with NFS, can't find what I need in the man pages... NoeticRapture Slackware 12 03-31-2010 10:37 PM
General Knowledge about man pages and config files... SimbaSpirit Linux - Newbie 3 08-12-2008 11:20 PM
Man pages error, Dual Locales caused it? Debian Sid. bence8810 Debian 3 03-19-2006 01:02 PM
How to get gcc to find my 'include' and 'lib'? renshao Linux - General 4 03-11-2006 07:02 AM
Where is my other gcc include files ?? DevandeAsk Ubuntu 1 01-30-2006 08:04 AM


All times are GMT -5. The time now is 06:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration