2. Should I call NimMain? I have searched and found that Araq said "You need to also call NimMain at startup, generated by Nim" <https://forum.nim-lang.org/t/5318#33385>. But, at least for my python code, there is no difference no matter I call NimMain or not
import ctypes
DLL = ctypes.CDLL('a.dll')
#~ DLL.NimMain()
print(DLL.add(10, 29))
3. how to export a variant in nimlang to DLL? I can't write
const
ver* {. exportc, dynlib.}= "2020"
else nim says
R:\a.nim(4, 22) Error: cannot attach a custom pragma to 'ver'