Discussion:
OBNC Interfacing with C library
(too old to reply)
Hưng Gia
2020-03-06 07:42:21 UTC
Permalink
Hi. I found it currently very hard to interfacing with C library on OBNC. Yes, I know we could do our implementation in C but I said about interfacing with already written library, e.g: the C standard library. Could we follow GNU Modula-2, we define a .def file like them and just use the function directly from the lib without going the route above?

https://www.nongnu.org/gm2/interface_to_c.html

https://www.nongnu.org/gm2/gm2-libslibc.html

It seemed OBNC's .def file is served a very different purpose than GNU Modula-2.
miasap
2020-03-07 17:23:16 UTC
Permalink
Post by HÆ°ng Gia
Hi. I found it currently very hard to interfacing with C library on OBNC. Yes, I know we could do our implementation in C but I said about interfacing with already written library, e.g: the C standard library. Could we follow GNU Modula-2, we define a .def file like them and just use the function directly from the lib without going the route above?
https://www.nongnu.org/gm2/interface_to_c.html
https://www.nongnu.org/gm2/gm2-libslibc.html
OBNC has been designed not to require any incompatible extensions to the
Oberon language as defined in the report. What functions do you want to
interface to?
Post by HÆ°ng Gia
It seemed OBNC's .def file is served a very different purpose than GNU Modula-2.
Yes, ".def" files are created by the obncdoc command and contains module
interface documentation.


-- Karl

Loading...