I am trying to export a variable from an executable binary on Windows. E.g:
__declspec(dllexport) int MyVar = 5;
However simply decorating it with exportc pragma doesn't seem to work.
let MyVar {.exportc.} : int = 5
How does one export variables in Nim?
P.S. For now I am using emit workaround for this.
{.emit: """
__declspec(dllexport) int MyVar = 5;
""".}