Moved pragma into the include file as well
Peter Munch-Ellingsen peterme@peterme.net
Wed, 25 Oct 2017 23:06:09 +0200
2 files changed,
2 insertions(+),
2 deletions(-)
M
dynamic/dynamicadd.nim
→
dynamic/dynamicadd.nim
@@ -1,7 +1,6 @@
## This is all you need to create a min module in Nim ## Compile with `nim c --app:lib --noMain -d:release dynamicadd.nim` -{.pragma: rtl, exportc, dynlib, cdecl.} -import mindyn +include mindyn proc setup*(): DynInfo {.rtl.} = result = DynInfo(moduleName: "the_lib", dynlibVersion: 1)
M
dynamic/mindyn.nim
→
dynamic/mindyn.nim
@@ -1,3 +1,4 @@
+{.pragma: rtl, exportc, dynlib, cdecl.} type DynInfo* = object moduleName*: string # The name of the symbol to load and run