Closed HugoGranstrom closed 3 years ago
You need to import a file that re-export that contains {.passC:"-DNOMINMAX.}
. We could reuse config.nim or create a specific file for this purpose (either is fine with me).
So for example add to flambeau.nim (and other "exporting" files)
import flambeau/config
export config
and to config.nim / a dedicated file add :
when defined(windows):
{.passC: "-DNOMINMAX".}
THat should do the trick
Oh right, that's true 😄
Doing it in config.nim sounds sounds most straightforward 👍 We will probably have to add more flags in the future if we stumble upon more of these.
That's how I did it in nimjl : https://github.com/Clonkk/nimjl/blob/master/nimjl/config.nim
Nice, it works like a charm now :)
When trying to run the
nn
test I got this error on Windows:It was solved by passing this with the compiler:
-t:-DNOMINMAX
Not sure where and how to define it so that it is applied to all files in Flambeau. :/