Libft is a 42 Madrid Common Core project in which you will learn to build your own C library that will be useful for future projects.
In the Libft project you will make your own set of functions based in the C standard library as well as other functions that do not belong to it.
- You will have to recode some of the C standard library
libcfunctions. - The functions will have the same prototypes and will behave like the original ones.
- The functions must stick to the
manofficial software documentation descriptions. - The functions nomenclature will begin with
ft_. - For example:
strlenwill beft_strlen.
- You will have to code new functions or some of those in the C standard library
libcbut in a different way. - Some of this functions may be useful to finish coding some of the Mandatory Part I functions.
- The use of global variables is forbidden.
- If you have to split your function into others, make sure that they are static functions so that they cannot be used outside the script.
- All files must be in the repository root folder.
- The delivery of unused files is forbidden.
- The program must compile with the
-Wall -Wextra -Werrorcompiler flags. - You must use the
arcommand to create the library.libtoolis strictly forbidden. - The
libft.afile must be created in the repository root folder.
- C compiler:
gcc,cc, etc... makeutility.
make: compile project.make clean: deletes compilation files except the executables.make fclean: deletes all compilation files.make re: executesmake fcleanandmake.
-
Clone the repository:
git clone https://github.com/RaulSoftDev/libft.git
-
Build the project:
make
-
Use the library in your project:
#include "libft/libft.h"
-
Compile your project:
gcc -Wall -Wextra -Werror *.c libft/libft.a