2

I am using AppCode to develop in C++ on MacOS but encountered an issue that I cannot overcome no matter how hard I try. I am missing C++ documentation on MacOS. When I query a man pages for stdc function then everything is just all right, even AppCode provides perfect inline documentation. But I don't know how to install documentation and manpages for C++ and its standard libraries. On linux it's easy and yum/apt-get/up2date stdlibc++-doc works just fine.

How am I supposed to get it working on Mac OS?

Martin Macak
  • 3,507
  • 2
  • 30
  • 54
  • 1
    [All OS X manpages here.](http://developer.apple.com/library/Mac/#documentation/Darwin/Reference/ManPages/) –  Dec 14 '12 at 20:37
  • Visitor might be interested in reading [this post](https://stackoverflow.com/questions/49976985/how-to-install-documentation-for-c-in-xcode) about installing documentation for libc++. Unfortunately no solution provided – Matthias Beaupère Jul 19 '19 at 14:02
  • According to [this post](https://stackoverflow.com/questions/50175411/how-can-i-show-c-code-documentation-in-xcode-9-3/50246298) this is not possible for recent xcode version – Matthias Beaupère Jul 19 '19 at 14:05

2 Answers2

1

My best recommendation is to go get Dash from the Mac App Store. It's a free app (with an IAP upgrade that removes some annoyances; the app is definitely worth paying for) that provides access to documentation sets for many languages, including C++. Its C++ documentation is based on cppreference.com. In any case, using Dash it's really easy to get the documentation on whatever C++ construct you need. Here's a screenshot of the documentation on std::vector:

enter image description here

Lily Ballard
  • 182,031
  • 33
  • 381
  • 347
  • 1
    Worth paying for? Looks like the app is free. –  Dec 14 '12 at 20:40
  • 1
    @VladLazarenko: App is free, but it sticks a pink bar at the bottom of the window that says cute things in an attempt to give you some minor reason for paying. I paid because I use the app every day and I wanted to support the developer. – Lily Ballard Dec 14 '12 at 20:41
  • So it seems there's no way to install libstdc++ man pages into Mac OS X? This kind of sucks. I don't want to use some proprietary tool when there is standard way to obtain documentation and that's man page repository. It's even integrated into many tools - AppCode and others (vim, emacs) can utilize man pages. – Martin Macak Dec 14 '12 at 22:42
  • @MartinMacak: the easiest and the fastest method is to Google it. Or just go to cppreference.com –  Dec 15 '12 at 03:25
0

I'm not sure about AppCode, but XCode doesn't install the command line tools by default. To install them, start XCode, Open the XCode menu and select Preferences. Click the Downloads tab. Install the command line tools. That worked for me to get the standard C and Objective C libraries at least.

Jeff Youngstrom
  • 399
  • 6
  • 17