Clarification regarding linking libraries using gcc
I am using Linux Mint 19.03
The inclued files (.h) are in /usr/include
geeksforgeeks.org says -
Quote:
-lm : This command link math.h library to our source file, -l option is used for linking particular library, for math.h we use -lm.
Code:
gcc -Wall source.c -o opt -lm
My first question is, how do I know -lm represents math.h?
What if I want to link malloc.h or locale.h? What am I supposed to put after -l if I want to link malloc.h or locale.h? How do I know what am I supposed to put after `-l` if I want to link malloc.h or locale.h?
My second question is, Why dont I have to link stdio.h to build:
Code:
#include <stdio.h>
int main()
{
printf("Hello world\n");
return 0;
}
My third question is, where is the inline code BBCode?