some questions on generating dynamic library

2020-07-30 Thread Yardanico
It's generally not possible to "export" a variable in a DLL, no matter the language. You need to make a function which will return that variable.

some questions on generating dynamic library

2020-07-30 Thread oyster
no matter let or var is used, no variable is exported in the DLL. yes, I know nimpy can be used to write PYD, but it has nothing to do with a common DLL.

some questions on generating dynamic library

2020-07-29 Thread snej
A “const” really only exists at compile time; it’s not something you can export. Try using “let” instead.

some questions on generating dynamic library

2020-07-29 Thread Yardanico
Also by the way, do you know [https://github.com/yglukhov/nimpy](https://github.com/yglukhov/nimpy) exists?

some questions on generating dynamic library

2020-07-29 Thread elcritch
What I found is that Nim code can (sometimes) be run from other code without calling NimMain, however, it results in random breakage. Any code dealing with constants or other items requiring initialization will break (printing floats for example). So your DLL code may not need NimMain if it's ca

some questions on generating dynamic library

2020-07-29 Thread oyster
I have some question, any hints? Thanks 1\. how to kill the `nimMain` in generated DLL, or in other way, how to do not export `nimMain` in DLL? 2\. Should I call NimMain? I have searched and found that Araq said "You need to also call NimMain at startup, generated by Nim"