Statics Libraries in C
Secundary Education′s Central Library

Statics Libraries in C

When I want to play an instrument, it is first necessary to know the musical notes and to know how to play them. Once I recognize them, I’m able to?freely play music because somewhere in my mind is the information on how to play each note, even when I play different songs.

In the same way, when programming, it is very helpful to have a file where functions are stored, so I can use them in the future for different programs. That way, we avoid rewriting the functions every time they are needed.

No hay texto alternativo para esta imagen
No hay texto alternativo para esta imagen

These types of files exist in the C language and are called libraries. There are dynamic and static libraries. In this article we will focus on the static type.


Any user can create their own libraries where they can store the function prototypes they want. Therefore, each one is able to generate their own libraries and include them in the programs.

The way to include a library is through statements of the type #include or #define, words that the compiler will translate. These words go in the beginning of the program.

No hay texto alternativo para esta imagen

On UNIX static libraries are usually recognized by the suffix *.a

要查看或添加评论,请登录

Gastón Larroque的更多文章

社区洞察

其他会员也浏览了