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;
""".}
