Linux下C/C++帮助手册安装方法 及使用方法
2012-11-01 17:27
531 查看
1. 安装C的帮助手册
如果你使用的Linux发行版, 默认没有安装C语言的库函数MAN手册, 使用下面的方法解决:
# sudo apt-get install manpages
# sudo apt-get install manpages-de
# sudo apt-get install manpages-de-dev
# sudo apt-get install manpages-dev
2. 安装C++的帮助手册
一般的Linux发行版不会默认安装C++的帮助手册. 安装方法如下
http://gcc.gnu.org/mirrors.html是一个GCC的镜像站点
进入http://mirrors-us.seosue.com/gcc/站点, 或者其他的可用站点, 找到路径libstdc++/doxygen/, 下载文件libstdc++-api-4.5.2.man.tar.bz2, 或者其他更新的版本.
解压后, 将man/man3下的所有文件拷贝到/usr/share/man/man3/中, 即可.
man printf
man 3 printf
man cat
但是为了避免造成操作系统、C语言与C++的混淆,目前安装的C++ man pages与上面的查询命令有一些不同,主要是加了命名空间的限定,也就是说用这样的命令 : man cout , 是查询不到的。
正确的方法应该是:
man std::iostream ,之后再通过搜索/cout,找到cout的说明
也就是说现在的查询命令应该是
man namespace::header
man 命名空间::头文件
下面是英文原文:
How many times did you try on the terminal the following command and got frustrated
If you have decided that there is no way you can find more about cout apart from going to web, then read the article on
how to install C++ man pages?
Once you have installed the documentation, you must follow the following method to know more about the function
If you are searching about cout, you know it is part of the namespace std and defined in the header
iostream. So to search for cout, you must type
Once the man page is open, you can search for cout.
Similarly for slist related function
Thus the syntax to search any c++ man page is
Note: The man pages are generated using doxygen. You may not much elaborate description like you get for C function.
如果你使用的Linux发行版, 默认没有安装C语言的库函数MAN手册, 使用下面的方法解决:
# sudo apt-get install manpages
# sudo apt-get install manpages-de
# sudo apt-get install manpages-de-dev
# sudo apt-get install manpages-dev
2. 安装C++的帮助手册
一般的Linux发行版不会默认安装C++的帮助手册. 安装方法如下
http://gcc.gnu.org/mirrors.html是一个GCC的镜像站点
进入http://mirrors-us.seosue.com/gcc/站点, 或者其他的可用站点, 找到路径libstdc++/doxygen/, 下载文件libstdc++-api-4.5.2.man.tar.bz2, 或者其他更新的版本.
解压后, 将man/man3下的所有文件拷贝到/usr/share/man/man3/中, 即可.
在C++ man pages中查询C++的函数
在Linux下查询命令或函数的使用,通常是这样:man printf
man 3 printf
man cat
但是为了避免造成操作系统、C语言与C++的混淆,目前安装的C++ man pages与上面的查询命令有一些不同,主要是加了命名空间的限定,也就是说用这样的命令 : man cout , 是查询不到的。
正确的方法应该是:
man std::iostream ,之后再通过搜索/cout,找到cout的说明
也就是说现在的查询命令应该是
man namespace::header
man 命名空间::头文件
下面是英文原文:
How many times did you try on the terminal the following command and got frustrated
$ man cout No manual entry forcout |
how to install C++ man pages?
Once you have installed the documentation, you must follow the following method to know more about the function
If you are searching about cout, you know it is part of the namespace std and defined in the header
iostream. So to search for cout, you must type
$ man std::iostream |
Similarly for slist related function
$ man __gnu_cxx::slist |
$ man namespace::header |
相关文章推荐
- Linux下C/C++帮助手册安装方法 及使用方法
- Linux下C/C++帮助手册安装方法
- C++帮助手册man的安装和使用方法
- Linux下C/C++帮助手册安装方法
- Linux下C++的man安装及使用方法
- Linux下C++的man安装及使用方法
- Linux下C++的man安装及使用方法
- Ubuntu下C/C++man手册安装方法及使用方法
- Linux下C++的man安装及使用方法
- windows 安装后 帮助和支持无法使用的解决方法 (供参考)
- Ubuntu Linux gcc 安装 使用方法
- linux下载命令sz_Linux下rz/sz安装/卸载/使用方法
- PhpExcel中文帮助手册|PhpExcel使用方法
- 【转】linux下apache支持中文名的解决方法!(mod_encoding安装手册)
- VMware Workstation/Fusion 中安装 Fedora 23/24 及其他 Linux 系统时使用 Open VM Tools 代替 VMware Tools 增强工具的方法
- Linux下sonarqube安装使用方法(代码check工具)
- linux Eclipse上c++调用使用了tensorflow库的python程序遇到的问题及解决方法
- PhpExcel中文帮助手册|PhpExcel使用方法
- Linux使用yum安装时出现The program package-cleanup is found in the yum-utils package.解决方法
- linux下mysql安装使用手册(目前最全)