Skip to content

Creating a system library in Minix.

First of all go to /usr/src/include and create a header file with this structure:

NAME.h

_PROTOTYPE(int FUNCTION_NAME, (int PARAM));

After this go to /usr/src/lib/other and create the file with this structure:

NAME.c

#include<lib.h>
#include<unistd.h>
#include<stdio.h>

PUBLIC int FUNCTION_NAME(int PARAM) {
// WHAT TO DO?!
}

Edit the file Makefile.in in the same directory (/usr/src/lib/other). Add the name of your file in the list using alphabetical order.

What to do now?

You need to regenerate the Makefile.

$ cd /usr/src/lib/other/
$ make Makefile

Generate the libraries: (slow process)

$ cd /usr/src/tools
$ make libraries

And when it ends without erros “compile” the system:

$ cd /usr/src/tools
$ make hdboot

It will replace your system with the new one automaticlly, you must restart to see the changes.

Now how to test? Create a file in /root dir.

testTest.c

#include <stdio.h>
#include <unistd.h>
#include <lib.h>
#include <fcntl.h>
#include <NAME.h>

int main(int argc, char *argv[]) {
FUNCTION_NAME(PARAM);
}

Now you can create your own libraries to Minix system.

Example of library created by user to Minix

Best Regards,
Matheus

Published inAprendendoC

772 Comments

  1. joker online casino canada, poker usa artrix and largest casino mate no deposit
    bonus codes 2022 (Dalton) in australia 2021, or how many casinos are in usa

  2. an canadian casino, no deposit bonus codes casino in osceola
    ia (Philip) usa and how to hack canadian pokies, or bet365 craps strategies usa

  3. casino online usa all sites, free pokie games united kingdom and 200 playing blackjack as a business
    free download, Marilyn, spins no deposit canada, or best free poker sites united states

  4. canada visa slots, new 2021 usa how to play gambling online (Blake) casinos and ept poker chips in usa, or casino in christchurch new
    zealand

  5. $1 min deposit casino australia, canadian gambling statistics 2021 and
    5 dollar deposit online casino usa, or canadian accepted online poker sites

    Also visit my webpage are nh casinos open (Damian)

  6. $1 minimum deposit mobile casino canada, gambling revenue canada and new
    zealandn eagle slot machine, or new zealandn slots app

    my site … casinos in south africa list (Marla)

Leave a Reply

Your email address will not be published. Required fields are marked *