and likely you'd want to replace hello.cbl by %1.cbl (if you want to pass it as argument) or by %1 if you want to be able to "drop" the file onto the bat file.
... just a note: if you want a nice IDE environment: install VSCodium and then drop it to the set_env.cmd - you then can directly use cobc -x hello.cbl in its integrated terminal and can also add "build" tasks that will do this for example for the active file, showing you the errors/warnings/infos in the problem pane and also in the editor window.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to compile my first program. I have everything in a batch file. I get the error:
gcc: error: Ic:\gnucobol\BDB2\include: Invalid argument
any assistance would be great.
Last edit: Simon Sobisch 2021-06-10
You'd want to at least use
but possibly even
to reduce the amount of issues you can get if those flags already contain a parenthesis or quotes or...
Note: if you use Arnold's builds you can make that much more simpler:
Nothing more needed :-)
For older versions of his builds:
and likely you'd want to replace
hello.cblby%1.cbl(if you want to pass it as argument) or by%1if you want to be able to "drop" the file onto the bat file.... just a note: if you want a nice IDE environment: install VSCodium and then drop it to the
set_env.cmd- you then can directly usecobc -x hello.cblin its integrated terminal and can also add "build" tasks that will do this for example for the active file, showing you the errors/warnings/infos in the problem pane and also in the editor window.Thanks Simon. I finally got it to compile, with your help. I now have a bat file that will compile my code. Thanks!