Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I downloaded gcc-4.1-doc package to my Ubuntu computer. How can I use it? What command should I execute to see this documentation?

share|improve this question

migrated from stackoverflow.com Mar 13 '10 at 2:55

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 4 down vote accepted

man gcc should do the trick. /usr/share/doc/gcc-4.1/ also contains docs.

Here's the list of files that are installed: ` /usr/share/doc-base/gcc-4.1

/usr/share/doc-base/gccint-4.1

/usr/share/doc/gcc-4.1-base/gcc.html

/usr/share/doc/gcc-4.1-base/gccint.html

/usr/share/doc/gcc-4.1-doc

/usr/share/info/gcc-4.1.info.gz

/usr/share/info/gccint-4.1.info.gz `

So you can use the info program to read the docs as well.

share|improve this answer
    
Thank you, got it working. I see that this is language specification and command line reference. What about CRT functions? For example, I want to type "sqrt" and see its definition, required h-file and library where this function is placed. –  Alex Farber Mar 12 '10 at 20:10
    
try apropos sqrt. Output: csqrt (3) - complex square root csqrtf (3) - complex square root csqrtl (3) - complex square root sqrt (3) - square root function sqrtf (3) - square root function sqrtl (3) - square root function If you do not get the required output you should try installing libc6-dev –  Radhesh Mar 12 '10 at 20:12

Running man gcc is likely to give you an abbreviated manual page.

Usually (most systems - I'm not certain of Ubuntu specifically) you get more information from:

info gcc

You might need to specify where info is to look for the documentation; add options such as:

info -d /usr/gcc/v4.1 -f gcc.info gcc

You might need to specify a sub-directory like /usr/gcc/v4.1/share/info rather than the configured prefix directory.

share|improve this answer

gcc's man page is only good for an overview of the command line options. The real documentation is in info format.

You can use the 'info' program to view the full documentation : 'info gcc'. If you are an emacs user, you can use it's info mode also (M-x info to get there).

The gcc-*-doc packages also include html formated versions of the info docs. You can point your web browser to file:///usr/share/doc/gcc-4.1-base/ to find it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.