如何在 os x 上获取 C++ 手册页?
how to get c++ man pages on os x?
在Ubuntu中,安装libstdc++6-x.x-doc后,可以通过man获取文档,例如libstdc++-4.8-doc:
man std::list
man std::weak_ptr
man std::ios_base
是否可以在 OSX 上安装 c++ 的手册页(使用 brew 或任何其他方式)?特别需要手册页的原因是我可以使用 SHIFT-K
.
从 vim 访问它们
注意:我使用的是 XCode 版本的 g++:
snowch$ g++ -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
您可以从 here 安装这些手册页。只需 运行 以下命令:
$ git clone https://github.com/jeaye/stdman
$ cd stdman
$ ./configure
$ make install # as a user with appropriate permissions to install
在Ubuntu中,安装libstdc++6-x.x-doc后,可以通过man获取文档,例如libstdc++-4.8-doc:
man std::list
man std::weak_ptr
man std::ios_base
是否可以在 OSX 上安装 c++ 的手册页(使用 brew 或任何其他方式)?特别需要手册页的原因是我可以使用 SHIFT-K
.
注意:我使用的是 XCode 版本的 g++:
snowch$ g++ -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
您可以从 here 安装这些手册页。只需 运行 以下命令:
$ git clone https://github.com/jeaye/stdman
$ cd stdman
$ ./configure
$ make install # as a user with appropriate permissions to install