Libraries for standard materials (i.e.: cout, etc.) * NEWBIE QUESTIONS * :)

I was wondering what standard C libraries contain all functions / definitions such as abs (), cout, printf streams, etc.

I am familiar with header files (stdio.h, cmath.h, time.h, etc. etc.), but there seems to be no matching .lib or .dll (i.e. stdio.lib , time.dll, etc.).

Where is the actual code for the functions in these header files? I do not understand something? Is there one huge lib file containing all the standardized materials, or one for each header?

Any help is appreciated !!

Thank!

+3
source share
5 answers

. Windows C ++. C ; ++ , .

+4

Linux/- UNIX/AIX, ldd. - ldd `, ls` Linux. :

librt.so.1 => /lib/tls/librt.so.1 (0x0084c000)
libacl.so.1 => /lib/libacl.so.1 (0x40022000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00289000)
libc.so.6 => /lib/tls/libc.so.6 (0x00a0b000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00c57000)
/lib/ld-linux.so.2 (0x009ec000)
libattr.so.1 => /lib/libattr.so.1 (0x40028000)

, . Windows, depend.exe http://www.dependencywalker.com -

+3

C ++. , .

, gcc, -, (, -nodefaultlibs, -nostdlib -nostartfiles).

, , .

+2

, ldd ( binutils), , SO libc. Linux GNU C, glibc.

+1

If you mentioned a DLL, I assume you are using Windows. In this case, as a rule, there is one DLL "runtime" supplied with the compiler. With Visual C ++, I find the name msvcrt.dll or the like.

0
source

Source: https://habr.com/ru/post/1753642/


All Articles