Entradas

Mostrando entradas de octubre, 2021

C static libraries

Imagen
  Hi my dear tech readers, today i will talk about static libraries in C programming. A static library is a compiled object file containing all symbols required by the main program to operate (functions, variables etc.) as opposed to having to pull in separate entities. So we will have all the symbols in a pack, to use them when we need it. Cool, isn´t it? Finally we can save time and efforts finding different functions, prototypes, variables and so! Static libraries are better for quickly getting a library up and running, but it also has drawbacks. It gets compiled into every program that uses it. This is so refreshing, but how do the static libraries work? Let´s answer the question explaining the steps to create a static library. 1. The first step to create a static library is to gather all the files or functions that you want to include in the library. All of these files should end in “ .c ”. 2. When you  get all "c" files in your directory, compile and convert them in...

What are hard and symbolic links on Linux? How to create them, and what is the difference between both?.

Imagen
  Definition: A symbolic link (it is call a symlink too) is a type of file in Linux that points to another file or a folder on your computer. This kind of links are pointers to a file. Like pointers in any programming languages, links in LINUX are pointers pointing to a file or a directory. Creating links is a kind of shortcuts to access a file. Links allow more than one file name to refer to the same file. There are some types of links, but the most important types are hard and soft links, let´s talk about it for a while: Soft links .  A soft link is similar to the file shortcut feature which is used in Windows Operating systems. Each soft linked file contains a separate Inode value (An inode is a data structure in UNIX operating systems that  contains important information pertaining to files within a file system) that points to the original file. As similar to hard links, any changes to the data in either file is reflected in the other. Soft links can be linked across ...