Update Examples
This commit is contained in:
parent
b613920f1f
commit
4c880db828
2 changed files with 64 additions and 6 deletions
|
|
@ -1,7 +1,10 @@
|
|||
# Compile with: nim c --noMain --app:lib plugin.nim
|
||||
proc hello(x: int) {.exportc.} =
|
||||
proc hello(x: int32) {.cdecl, exportc, dynlib.} =
|
||||
echo "Hello world, ", x
|
||||
|
||||
proc highFive(): int {.exportc.} =
|
||||
proc highFive(): int32 {.cdecl, exportc, dynlib.} =
|
||||
result = 5
|
||||
echo "Here you go!"
|
||||
|
||||
proc helloFancy(f: proc (n: int32): int32 {.cdecl.}) {.exportc.} =
|
||||
echo "Such fancyness, ", f(42)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue