I downloaded nim today and tried to compile the hello world program given in the nim tutorial. I get the following error on using "nim c hello.nim":
desktopnimcachestdlib_system.o:stdlib_system.c: (.text+0xb247): undefined reference to '_wfopen'
desktopnimcachestdlib_system.o:stdlib_system.c: (.text+0xb247): relocation truncated to fit: R_X86_64_PC32 against undefined symbol '_wfopen'
desktopnimcachestdlib_system.o:stdlib_system.c: (.text+0xc287): undefined reference to '_wfreopen'
desktopnimcachestdlib_system.o:stdlib_system.c: (.text+0xc287): relocation truncated to fit: R_X86_64_PC32 against undefined symbol '_wfreopen'
I guessed that is because I have the cygwin gcc in my path so the nim compiler is using it. I compiled the files generated in the nimcache folder with the mingw gcc downloaded along with nim and it works. Is there any way to tell the nim compiler the path of gcc to use?
I had tried setting gcc.path = r"$nimrod\dist\mingw\bin", but the compiler kept giving me Error:
Error : unhandled exception : invalid format string [Value Error],
but after your reply, I tried setting it to r"$nim\dist\mingw\bin" and now it works. Thanks for the response.
Also, just out of curiosity, any idea why I was getting the above error messages on using my cygwin gcc.