> But it seems to not be the case. I now think it's one of your dependencies
> that adds it.
Are you talking about the imports I use? Because I find it strange that they
would influence the compiler arguments. Anyway, to prove that it doesn't have
to do with that, I made a simple hello world and it gives the same error.
$ cat test.nim
echo "Hello world!"
$ nim c -d:mingw test.nim
Hint: used config file '/etc/nim/nim.cfg' [Conf]
Hint: used config file '/etc/nim/config.nims' [Conf]
........................................................................
CC: ../../../../usr/lib/nim/system/exceptions.nim
CC: ../../../../usr/lib/nim/std/private/digitsutils.nim
CC: ../../../../usr/lib/nim/system/dollars.nim
CC: ../../../../usr/lib/nim/std/exitprocs.nim
CC: ../../../../usr/lib/nim/std/syncio.nim
CC: ../../../../usr/lib/nim/system.nim
CC: test.nim
Hint: [Link]
/usr/lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld:
unrecognized option '-z'
/usr/lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld:
use the --help option for usage information
collect2: error: ld returned 1 exit status
Error: execution of an external program failed:
'/usr/bin/x86_64-w64-mingw32-gcc -o /home/dirk/projects/nim-opengl/test.exe
/home/dirk/.cache/nim/test_d/@m..@s..@s..@s..@susr@slib@snim@[email protected]
/home/dirk/.cache/nim/test_d/@m..@s..@s..@s..@susr@slib@snim@sstd@[email protected]
/home/dirk/.cache/nim/test_d/@m..@s..@s..@s..@susr@slib@snim@[email protected]
/home/dirk/.cache/nim/test_d/@m..@s..@s..@s..@susr@slib@snim@[email protected]
/home/dirk/.cache/nim/test_d/@m..@s..@s..@s..@susr@slib@snim@[email protected]
/home/dirk/.cache/nim/test_d/@m..@s..@s..@s..@susr@slib@[email protected]
/home/dirk/.cache/nim/test_d/@mtest.nim.c.o -Wl,-Bstatic -lpthread
-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Run
Adding your earlier suggested arguments doesn't help either.