I have started porting MPFR (https://www.mpfr.org/) to Nim and so far it's working rather fine: https://github.com/arturo-lang/arturo/blob/add-support-for-big-floating-numbers/src/extras/mpfr.nim (there is a lot of commented-out code, mostly from the GMP port since they are too similar, and I'm using them as a reference - so, you can safely ignore them)
So... the whole thing compiles and runs fine on macOS and Ubuntu, but I keep getting a specific compiler error on Windows only (running in a CI build):
D:\a\arturo\arturo\src\helpers\bignums.nim(126, 40) Error: undeclared field: 'mp_size' for type mpfr.mpfr [type declared in D:\a\arturo\arturo\src\extras\mpfr.nim(89, 5)]
The problem is... I can see no mp_size field, and if it was there... I guess it pops up only in Windows lol...
Nim: 1.6.6 System: MSYS2 with mingw-w64-x86_64-toolchain and mingw-w64-x86_64-mpfr installed
Any pointers towards the right direction would be more than welcome! :)
I can confirm the rule that... only when you properly format a question is it that you actually spot the problem: I now realized that the error was not coming from the MPFR port, but from a totally different file (a "helper" module actually) and yes, in that case, I do have Windows-specific code that tries to access this non-existant .mp_size field.
Good for me... lol