Skip to content
This repository was archived by the owner on Sep 21, 2024. It is now read-only.

Basic Usage

redd edited this page Nov 11, 2023 · 1 revision

Compiling

How to compile your program with reddlibc :

user@host:cproject$ gcc main.c -l:reddlibc.a

main.c : Your C program.

-l:reddlibc.a : Name of the reddlibc library.

NOTE : If the library was installed in a directory were your compiler does not look for libraries by default, add -L /path/to/lib/dir before -l:reddlibc.a.

Including

Simply add #include <namefheader.h> in your C program :

Example program using the upperstr defined in rlibstr.h :

#include <rlibstr.h>
#include <stdio.h>

int main(void) {
    char *hello = ("hello world!");
    upperstr(hello);
    printf("%s\n", hello);
}

Said program will output :

user@host:cproject$ ./hello
HELLO WORLD!

Clone this wiki locally