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" 
<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))
    
    
    Run

3\. how to export a variant in nimlang to DLL? I can't write 
    
    
    const
        ver* {. exportc, dynlib.}= "2020"
    
    
    Run

else nim says 
    
    
    R:\a.nim(4, 22) Error: cannot attach a custom pragma to 'ver'
    
    
    
    Run

Reply via email to