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

1,243 Comments

  1. fast withdrawal casino usa 2021, is there a casino in taunton and where is gambling legal in australia, or niagara falls usa casino

    my homepage … palazzo blackjack (Darci)

  2. best gambling websites uk, 888 poker login australia and casino frenzy 250 free spins, or how to win on the pokies in united states

    Feel free to visit my page: adams roulette system review – Julienne –

  3. how do poker machines work in australia, is it legal to play online slots in australia and play slots for real money usa, or usa real money slots no deposit bonus

    Feel free to visit my web blog; Casino Game Red Roulette (Cmiphil.Com)

  4. online pokies free spins on sign up canada,
    real slot machines for sale canada and how many what did god said about gambling (Trena) casinos are in the united states, or casino in christchurch new zealand

  5. new united statesn no deposit bonus huuuge casino hack app (Carmon) 2021, united statesn original slot machine game and roulette online united states, or united kingdom
    real money pokies online

  6. united statesn roulette online fast, $5 minimum deposit casino
    new zealand 2021 and how old do you have to be to go
    in a what does big casino mean – Carissa – usa,
    or deposit 10 get usa

  7. yukon gold is the copper coulee casino open (Amber) legit, usa online casino no deposit
    and yukon gold online gambling, or minimum
    dollar 5 deposit casino australia

Leave a Reply

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