Hi,
I'm trying to create a static-lib from a nim source so that I can use it in my other C projects. But, static-lib creation fails in macOS. Using version 0.17.2.
Here's the command-
nim cc -d:release --header --noMain --app:staticlib test.nim
It gives the error
sh: llvm-ar: command not found
Error: execution of an external program failed: 'llvm-ar rcs libtest.a ...
But if replace
llvm-ar
with just ar
and run the command myself manually, the static lib is created as expected.I don't know anything about macOS so I can just propose an ugly workaroud, probably someone else will come up with a better solution: create an alias in your .bashrc
alias llvm-ar="ar"
Anyway, I may guess that either you don't have llvm-ar in your PATH, or it is not installed, or it is installed with another name (like, maybe, ar)