"-lpthread" flag is added by the default `nim.cfg`: # Configuration for the GNU C/C++ compiler: @if windows: ... @if gcc: gcc.options.linker %= "-Wl,-Bstatic -lpthread" @end ... @end Run
To override it - create a local `nim.cfg` in project directory with this content: @if windows: @if gcc: gcc.options.linker = "-Wl,-Bstatic" @end @end Run