- Recreating 28 standard library functions in C language
- Project done at WeThinkCode JHB campus (based on 42 france coding curriculum)
- More info on WeThinkCode: https://www.wethinkcode.co.za/
- More info on 42 school(US based school English site): https://www.42.us.org/
- More info on 42 school(France based school French site): https://www.42.fr/
- C
- Student are given the prototype for functions and must re-create behaviors as the originals
- Heap allocated memory space must be properly freed when necessary (e.g use for
Malloc) - A
Makefilemust be used to create a static library calledlibft.a - To use functions in library the header
libft.his used - To get a full project outline please refer to the pdf
- Create a new folder (e.g
test_libft) git clonerepo insidetest_libft- Enter
/libftfolder - To compile
Makefiletype:
make re- Go back to
/test_libft
- Inside
/test_libftcreate a .c file (e.g.test.c) - Open
test.cand add library header#include 'libft/libft.h' - Create a int main()
- Call a function from
libft.h(e.g.ft_putstr("Hello World")) <-ft_putstr()is a LIBFT function to display a string to standard output - To compile file type:
gcc test.c libft/libft.a- To execute file type:
./a.out- You should see
Hello World
displayed to standard output
make re- recompile library when changes are made to functionsmake clean- removes all function objectsmake fclean- removes all function objects created with library object




