View Full Version : offline reference manual for g++?
glinsvad
January 25th, 2006, 02:36 PM
I used to code with Borland C++ Builder (3 back in 98' :D), which came with an extensive and phenomenal reference manual for all functions/headers/libraries etc.
Now I'm using g++ in Linux Ubuntu, which works fine for me so far. I know there are excellent online documentations (e.g. http://man-wiki.net/) , but I don't always have internet access so I need an offline doc as well.
Anything you can recommend? I guess the best thing would be a Help-file, like the one that comes with Ubuntu...
EDIT: Added a poll to find out what you use.
Viro
January 25th, 2006, 03:02 PM
apropos and man are all you need ;).
glinsvad
January 25th, 2006, 03:13 PM
Well don't I feel silly... the manual has its own manual :p
man man
apropos and man are all you need
To the best of my understanding, no they are not. man and apropos provide information on executables (e.g. commands like cd, ls) and file naming-conventions. If there were a secret door leading to the rest somewhere, then this would be me trying to find it: ](*,)
I need documentations for stuff like Standard Library Routines for GNU C++, which tells you what functions/routines to call, which classes to use, type of datastructures etc.
To give an example on sprintf from http://www.cplusplus.com/:
int sprintf ( char * buffer, const char * format [ , argument , ...] );
Print formatted data to a string:
Writes a sequence of arguments to the given buffer formatted as the format argument specifies.
Parameters:
buffer
Buffer where to store the resulting formatted string.
format
String that contains the text to be printed. Optionally it can contain format tags that are substituted by the values specified in subsequent argument(s) and formatted as requested. The number of format tags must correspond to the number of additional arguments that follows.
The format tags follow this prototype:
%[flags][width][.precision][modifiers]type
...
This is really bumming me out :-|
toojays
January 25th, 2006, 07:07 PM
If you want documentation for the standard C library, install the package libc-doc. Then you will have all the man pages (i.e. you can do "man sprintf" and get what you expect), as well as the (more comprehensive) info file for libc (which you can view using Emacs or the info program).
Alternatively, you can get the same information in two massive hardcover volumes: GNU C Library: Application Fundamentals (http://www.gnupress.org/clib-fund.html) and GNU C Library: System & Network Applications (http://www.gnupress.org/clib-system.html).
Gilward Kukel
January 25th, 2006, 10:07 PM
If you want documentation for the standard C library, install the package libc-doc.
I think the package is called glibc-doc. And it is only for C, not for C++.
For C++, I think you need to install the package libstdc++6-4.0-doc.
Then look at file:///usr/share/doc/gcc-4.0-base/libstdc++/html_user/index.html
Here is the online version: http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html
Viro
January 26th, 2006, 05:01 AM
Well don't I feel silly... the manual has its own manual :p
man man
To the best of my understanding, no they are not. man and apropos provide information on executables (e.g. commands like cd, ls) and file naming-conventions. If there were a secret door leading to the rest somewhere, then this would be me trying to find it: ](*,)
Install the development documentation. I think it's manpages-dev, and you will have the standard C documentation. For C++ documentation, just use the libstdc++ docs you can find on the GNU website.
glinsvad
January 27th, 2006, 11:45 AM
thanks guys, that was just what the doctor ordered...
henok
October 6th, 2009, 12:13 PM
For C++, I think you need to install the package libstdc++6-4.0-doc.
Then look at file:///usr/share/doc/gcc-4.0-base/libstdc++/html_user/index.html
Here is the online version: http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html
It turns out manpages-dev is what I needed. But I installed libstdc++6-4.1-doc earlier and I was wondering how I can use it? What's the command?
dwhitney67
October 6th, 2009, 12:32 PM
It turns out manpages-dev is what I needed. But I installed libstdc++6-4.1-doc earlier and I was wondering how I can use it? What's the command?
Try loading this document from your web browser:
file:///usr/share/doc/gcc-4.1-base/libstdc++/html/index.html
Btw, why did you install the 4.1 version? Version 4.3 is available (although it probably discusses the same API).
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.