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,122 Comments

  1. gambling statistics uk, free $25 online bingo australia
    and best sign up bonus vicksburg casino – Trey, united
    kingdom, or bingo cash free uk

  2. online casino deposit match (Arturo) free bet no deposit uk, best $10 deposit bonus new
    zealand and best casino sites united states, or australia online gambling
    stock

  3. 5$ deposit new casino hopkinsville ky – Shelia, canada,
    usa online casino reviews and do you have to pay tax on casino winnings in canada, or best free poker sites united states

  4. united statesn roulette builders, free spins new casino usa
    and how to play video baccarat – Jorja, many pokies are in united states,
    or $5 min deposit new zealandn casinos

  5. new united statesn no deposit bonus quapaw casino (Rodney) 2021,
    online gambling uk statistics and does united kingdom have a gambling problem, or internet gambling uk

  6. online free sign bonus casino (Romaine) canada easy withdrawal, how
    many poker machines in australia and pokies real money united states, or united kingdom roulette strategy to
    win big

Leave a Reply

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