- Includes all functions from Libft
- Includes my own version of printf
- Includes get_next_line project.
- All functions are defined by doxygen comments to explain their purpose and enhance readability.
- Makefile to compile the library
- Clone the repository
git clone https://github.com/RealConrad/42c-library.git
- Enter directory
cd 42c-library
- Create the library
make
- Clean up object files (Opitonal):
make clean
Make sure you create the library before compiling, else you will get errors!
- Add the header file
include "c-library.h" // # include <path-to-header-file>
- Compile with the following flags
cc -Wall -Wextra -Werror <your-file> libft.a
File: main.c
# include "c-library.h"
int main() {
char *s = "Hello World!";
int length = ft_strlen(s);
ft_printf("Length: %d\n", length);
return (0);
}
Compiling:
cc -Wall -Wextra -Werror main.c libft.a