C libraries are awesome
C libraries are like have ready yor favorite tools wherev
Why use C libraries?
Programming job can be repetitive and tired but there are a very important resourse called libraries, there are packaged code files who contain tools to solve program problems specially when you need use and re use your own functions.
How they work?
Libraries work is interestering, they work generally in linkering time but some job is done in compiled time, that depends on programming context.
How to create them
gcc -Wall -pedantic -Werror -Wextra -c *.c ar -rc <filename>.a *.o
There are some ways to create them but my favorite way is by a both of terminal instructions like gcc -Wall -pedantic -Werror -Wextra -c *.c who convert all .c files to binary files ended in .o after that I use a instruction like ar -rc <file_name>.a *.o that generate files called in .a first command compile in pre-linking time all .c files and out .o files ready to package in our library and second command package libraries, in -rc flags -r is used to update libraries and -c to create.
How to use them
gcc -L. -l<filename> .*o
After before proccess you can include your created libraries to use it freely in file header using nice gcc flags in files like -L. -l<filename> *.o who make your own portable and usable library to run everywhere -L. take all files in current directory, -l<filename> package all files in current file ranlib instruction is used to create or add libraries to file.