Running K/ngnk: Difference between revisions
Content added Content deleted
Subsetpark (talk | contribs) No edit summary |
Subsetpark (talk | contribs) No edit summary |
||
Line 23: | Line 23: | ||
Roughly, including external libraries into ngn/k programs consists of three steps: |
Roughly, including external libraries into ngn/k programs consists of three steps: |
||
# Write a K-compatible C program by including the <code>k.h</code> header |
|||
# Compile the C program into a shared object file |
|||
# Inside of a K program, load the shared object file and assign it to a verb. |
|||
Note that <code>k.h</code> and <code>libk.so</code> must be available to your compiler and linker, respectively: |
Note that <code>k.h</code> and <code>libk.so</code> must be available to your compiler and linker, respectively: |
||
# <code>k.h</code> is available in the ngn/k source code; |
|||
# The ngn/k makefile includes a target to build <code>libk.so</code>. |
|||
(The AUR package above installs both of the required files into the standard system directories) |
(The AUR package above installs both of the required files into the standard system directories) |