+
Skip to content

mordori/libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

libft

✨ Features

Library of commonly used standard and additional utility functions from libc recreated in C.

  • Some of the functions have been modified from the subject, e.g. to handle errors.
  • Includes functions from subsequently completed projects and expanded utility implementations.
  • Modularized into categories.

Note

This project was developed and tested using clang on Ubuntu. It will likely work on other Linux distributions and with compatible C/C++ compilers.

Tip

🚀 How to use

Working example can be seen in my fdf project where another Makefile clones and then compiles this library.

  • Clone the repository at the root level of your project.
git clone https://github.com/mordori/libft.git libft && cd libft
  • Run the following command to create libft.a.
make
  • Add #include "libft.h" to your files where used:
#include "libft.h"

Tip

For more granular inclusion, only add #include "libft_[CATEGORY].h" to your files where used. The header categories are found in the include/ directory. For example:

#include "libft_io.h"
...
ft_printf("Hello! There are %d %s in my fridge.\n", 4, "puddings");
...
  • Compile your program together with libft/libft.a and -I libft/include/ flag, e.g.
cc -Wall -Wextra -Werror [YOUR_PROGRAM] libft/libft.a -I libft/include/
  • To delete all of the compiled files, use:
make fclean

About

Library of standard and additional utility functions from libc recreated in C.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载