I tried reverting to Nim 0.11.0, and the libfib.nim.a file was now produced
when I ran compilation. I guess the documentation might be pretty out of date
in spots. However, I still had the same linker errors.
I am able to compile things just fine by passing in the C files directly and
not producing an intermediate library, as in the other example:
$ nim c --noMain --noLinking --header:fib.h fib.nim
$ gcc -o m -I$HOME/.cache/nim/fib_d -Ipath/to/nim/lib
$HOME/.cache/nim/fib_d/*.c maths.c
Run
That works for me. I might stick to this for now if I can.