>From [Nim Compiler user 
>guide](https://nim-lang.org/docs/nimc.html#dll-generation):
    
    
    Nim supports the generation of DLLs. However, there must be only one 
instance of the GC per process/address
    space. This instance is contained in nimrtl.dll. This means that every 
generated Nim DLL depends on
    nimrtl.dll.
    

To generate the "nimrtl.dll" file, goto Nim/lib directory and use the command: 
    
    
    nim c -d:release nimrtl.nim
    

then compile your project with: 
    
    
    nim --app:lib -d:useNimRtl c lib
    nim c -d:useNimRtl main
    

nimRtl not used if there is only single instance of GC, such as C app + Nim 
DLL, or Nim app + C dll. nimRtl used in situation like Nim app + Nim DLL, or C 
app + multiple Nim DLL

Reply via email to