Libraries in Programming are files that generally contain functionalities that programs can use to perform a specific task such as adding two numbers. In this post, we will see the difference between the two libraries the static and dynamic libraries.
Let’s imagine that we have many files, each with specific functionality that we know will be used by a program. One way to organize all these functionalities is to make a library with all these files, and we can even make libraries with related functionalities so that if we find an error we can solve it faster.
Another reason to…
In C, a static library is a file that contains multiple object files that can be used in the link phase of a program. This means that when we create an executable file, our library will be loaded in a said executable file, and during execution, it will only need to use the executable file to access the files of ours library.
The extension of these libraries is .a
and they always start with lib
The reason to use a static library is that by having our functions, variables and among other things that we previously added, it is easier…
To begin we must bear in mind that this script is divided into two partsgcc
what is a command and main.c
which is a file that contains the language C code we know that it is C language due to its extension .c
.
As its name implies it is a collection of compilers and it supports several languages: C, C ++, Objective C, Chill, Fortran, Ada and Java.
It was produced by the GNU project and basically what it does is it takes the code that we understand and write and transforms it into the binary language that computers…
basically if you run this command in your linux terminal it will show you all the files that end with a “.c” extension. let’s understand how it works
this command “ls *.c” has 3 parts
the command “ls” is one of the most used in the terminal of linux since this allows us to see the content found in a folder or directory, to use it, simply type ls in your Linux terminal and press enter.
If the directory is not empty you will see something like this:
Software Engineer student at HolbertonSchool