Introduction
In KolibriOS, system libraries are in the MS COFF format and the Obj extension. This article will show you how to import and use them in C--, GCC and TinyC.
SVN
Whenever you do something for KolibriOS you need to have a downloaded SVN.
svn co svn://kolibrios.org
It will be downloaded to the current folder.
C_Layer
In order to conveniently use the libraries in kos32-gcc, C_Layer was created ( forum topic , on WebSVN ).
Gcc
console.obj
KolibriOS. SVN/contrib/sdk/samples/cpp_hello ( ++, C). console_obj.h
C_Layer
SVN. /contrib/C_Layer/ASM make ( fasm). /contrib/C_Layer/EXAMPLE. . make.
TinyC
console.obj
. /programs/develop/ktcc/trunk/samples/consoleio.c . conio.h
, C_Layer. /programs/develop/ktcc/trunk/samples/clayer. boxlib . KolibriOS build_all.sh. iso, /kolibrios/develop/ktcc/, SVN. - windows linux.
C--
( /programs/cmm/c--
c--.elf linux, c--.exe windows c-- KolibriOS. , , ).
.
. boxlib:
#include "../lib/obj/box_lib.h"
For other libraries, respectively. Available .h:
- box_lib.h
- libio.h
- console.h
- librasterworks.h
- http.h
- netcode.h
- iconv.h
- network.h
- libimg.h
- proc_lib.h
- libini.h
- xml.h
And then you need to download:
load_dll(boxlib, #box_lib_init, 0);
Last parameter 1 for libraries:
- libgfx
- libimg
- libini
- libio
And for other libraries 0.
Which second parameter can be found in the corresponding .h file, or in other real C-- programs.
Write about inaccuracies and questions in the comments