Compiling a Nim program with nim c -r example.nim
creates the output file example
. I would like to create an output file in another folder with the name bin/example.o
which is much easier to gitignore.
What I've tried so far:
nim c -r example.nim -o:bin/example.o
nim c -r example.nim --out:bin/example.o
nim c -r example.nim -o:example.o
nim c -r example.nim --out:example.o
The result of all of these attempts is the same as if I left out the -o/--out
option, resulting in an executable example
file in the same folder as the example.nim
file. The compiler doesn't even accept the option if I don't pass in the -r
option (which makes me think I'm misunderstanding the purpose of that option).
I'm using Nim 0.10.3 installed and compiled from the github devel
branch source.
What compiler option will allow me to modify the compiled output file?
nim --fullhelp | grep '\-\-out:'
. – Andrew