oakc
oakc copied to clipboard
Unexpected or invalid argument '-c'
I followed the installation instructions but I ran into an issue: both arguments '-c' and '--cc' throw an error. I managed to compile the hello world example without any flags, but if that flag was removed I'd suggest removing it from the README and instead of throwing an error display an 'obsolete' warning.
Repro steps
1 - Clone the repo following main README instructions
git clone https://github.com/adam-mcdaniel/oakc
cd oakc
cargo install -f --path .
2 - Try and compile hello_world.ok example with -c or --cc flag:
oak c examples/hello_world.ok -c
3 - Watch error:

Did you try placing the '-c' flag before the file argument? The clap
crate might not parse the arguments in a different order without a special
setting. I will look into this.
On Mon, Dec 7, 2020, 5:11 PM Emiliano Ruiz [email protected] wrote:
I followed the installation instructions but I ran into an issue: both arguments '-c' and '--cc' throw an error. I managed to compile the hello world example without any flags, but if that flag was removed I'd suggest removing it from the README and instead of throwing an error display an 'obsolete' warning. Repro steps
1 - Clone the repo following main README instructions
git clone https://github.com/adam-mcdaniel/oakc cd oakc cargo install -f --path .
2 - Try and compile hello_world.ok example with -c or --cc flag:
oak c examples/hello_world.ok -c
3 - Watch error:
[image: image] https://user-images.githubusercontent.com/58179604/101411328-8d920c80-38bf-11eb-87d6-5b7114ab9483.png
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adam-mcdaniel/oakc/issues/92, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXLTP6ARI6BRU24DFV6ZR3STVHJ3ANCNFSM4URCX6QQ .
I imagine that the command line issue has not been fixed. It only compiles without -C. oak c hello_world.ok <= It works.
C:\temp\oakc\examples>oak c hello_world.ok -c <=Does not work. error: Found argument '-c' which wasn't expected, or isn't valid in this context
When we don't choose which compiler is functional. Which will be the standard, GCC or GO?
Can you tell how to choose the file name, as it compiles and becomes main.exe