C libraries are awesome

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
No hay texto alternativo para esta imagen

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
No hay texto alternativo para esta imagen

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.

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

Julian Cano的更多文章

  • WebXR technologies

    WebXR technologies

    What is WebXR? What XR is a awesome technology to use Extended Reality Immersive experiences in our web browsers, is a…

  • Port Translation - Cardboard to Oculus Quest II

    Port Translation - Cardboard to Oculus Quest II

    Cardboard 3DoF to Oculus Quest II 6DoF A port translation from Cardboard to Oculus Quest II have some topics to attend…

  • Face Detection for non-technical People

    Face Detection for non-technical People

    Basically facial recognition is use computational Artificial Intelligence (IA) to detect and analyze human faces for a…

  • Impact of virtual reality and immersive experiences

    Impact of virtual reality and immersive experiences

    Ethical challenges of AR(Augmented Reality) and VR(Virtual Reality) development The AR/VR development have ethical…

    2 条评论
  • The Shape of object oriented programming

    The Shape of object oriented programming

    what is Liskov’s substitution principle? It is a way to develop software using Object Oriented Programming(OOP) using…

  • What happens when you type holbertonschool.com in your browser and press Enter by Julian Cano

    What happens when you type holbertonschool.com in your browser and press Enter by Julian Cano

    In this article we will surf through very interesting concepts, technical and practical process when we type a web page…

  • IoT for my virtual friends

    IoT for my virtual friends

    Some days ago in Holberton showed up a very interesting but hard for me project to do, write a article about IoT, write…

  • Class and instance attributes

    Class and instance attributes

    blog post describing how object and class attributes work I go to explain in my own words what are the most 00p…

社区洞察

其他会员也浏览了