2

I have tried to get the manual for the function stdint.h typing $ man stdint and $ man 3 stdint but doesn't work. I get nothing. And I have tried the same for some of their functions like int8_t but I still getting nothing.

Although I am able to find those manuals online, I would like to know how to do that in the terminal.

What is wrong? What is the correct way?

Aaron-S
  • 61
  • 4
  • Make sure you've actually installed all the relevant man pages. Some distros don't install them by default. You can use `apropos stdint` to do a search. Here, it tells me to ask for `stdint.h`, and `man stdint.h` works. – Cong Ma Apr 28 '17 at 05:52
  • stdint.h is a header, not a function. Similarly, intXX_t are type names, not a function. So, man pages only indirectly describes them, only at least for ubuntu. It seems certain unix variants have this one listed under man page 7 under macros and conventions. But, for linux variants such as ubuntu, what you can do about them is type "vim /usr/include/stdint.h" and read the source code there. – noel aye Apr 28 '17 at 06:09

2 Answers2

0

To expand my comment, the standard man search command is apropos.

Example:

$ apropos stdint
stdint.h (0p)        - integer types

This tells you the title of the man page that matches your query is stdint.h, located in section 0p. If no pages can be found, it says nothing appropriate.

apropos can't always search the "fresh" man pages. It queries a cache that is typically built by a cron job. Freshly installed man pages may not become searchable until the next cache update.

Cong Ma
  • 10,692
  • 3
  • 31
  • 47
  • I have done that but I get `nothing appropate`. Could you tell me what is the best way to install `stdint.h` and other headers and functions? – Aaron-S Apr 28 '17 at 17:42
  • @Aaron-S, I'd suggest try consulting your distro's package database. This is highly distro-dependent. – Cong Ma Apr 29 '17 at 05:51
0

It is possible that you do not have the library stdint.h installed on your machine. To see if it exists see this, & also check the #include files which are generally in the directory /usr/include.

Chandrahas Aroori
  • 955
  • 2
  • 14
  • 27