currently we have the problem, that we have created a .dll written in nimrod which is loaded into a neko virtual machine running inside a webserver for its server side scripting. Since the neko VM relies on the boehm GC we also used the boehm GC for the nimrod .dll. The problem now is that the neko VM loads the boehm GC from gc.dll and nimrod loads the boehm GC from boehmgc.dll . Since this is on windows we cannot create a symlink to solve this and we cannot patch the neko VM to use boehmgc.dll. Now we patched mmdisp.nim to use gc.dll instead of boehmgc.dll, but this is not a solution for the future.
Now I was thinking a solution for situations like this would be the ability to overwrite a const value from the command line like:
nimrod c --overwrite:"boehmlib = 'gc.dll'"
what do you think ?
While I don't know much about Windows (outside Cygwin), --dynlibOverride will only stop that dynamic library from being loaded; it will not replace it with a static library. You can then (actually, have to) substitute either a dynamic or static library with the same interface; this is what the --clib option above is for.
I use this on OS X to link against a specifically tuned version of the Boehm GC.