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

775 Comments

  1. united states online casino real money, best payout online vegas rush casino promo codes 2022 (Aurora) usa and golden pokies united states, or best no deposit casinos aus

  2. new uk ovo casino (Alyce) no deposit free spins, new zealand poker players and best online
    real money slots new zealand, or free cash bonus no deposit casino canada

  3. is there a casino in toronto canada, web gambling usa and age to go to casino in new zealand, or united kingdom 1
    cent online casino (Jaimie) pokies paypal

  4. schnellste casinos mit hoher bonus

    Feel free to surf to my website – casino 10 einzahlen 100 bekommen – Gwen

  5. 1 dollar minimum deposit casino uk, united statesn casino online and fishing frenzy slot free online, or td united states visa debit gambling

    Also visit my webpage how to hack blackjack 21 (Trudy)

  6. free chip no deposit bonus codes 2021 canada, popular pokie machines australia and live dealer blackjack canada, or johnny
    rockets foxwoods casino (Danae) united states stock

Leave a Reply

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