Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: illi on October 02, 2009, 04:04:02 pm

Title: Wrong number of arguments passed to cb_console_runner
Post by: illi on October 02, 2009, 04:04:02 pm
Hi
I'm making a small program to school and I need redirect file to stdin.
I tried add to Program arguments this:
Code
--wpl 3 < inputs\in.normal
or something like that. But there is following problem: Program executed by cb_console_runner gets 5 arguments instead of 3 (program name, --wpl, 3).
Do you have please any ideas how to solve it?
Platform is Windows
Title: Re: Wrong number of arguments passed to cb_console_runner
Post by: MortenMacFly on October 02, 2009, 04:53:36 pm
But there is following problem: Program executed by cb_console_runner gets 5 arguments instead of 3 (program name, --wpl, 3).
console_runner was not designed to handle such (it also makes no sense). Just start a command prompt at where your executable is and run the command from there. Alternatively you can setup a tool in the tools menu very flexibly that does that for you.
Title: Re: Wrong number of arguments passed to cb_console_runner
Post by: jens on October 02, 2009, 05:19:51 pm
It works for me (on linux).

Can you please copy the output of the build-log (or more exactly the line with the cb_console_runner-command) and post it here.

And please tell us which version of C::B and which OS you use.
Title: Re: Wrong number of arguments passed to cb_console_runner
Post by: illi on October 02, 2009, 06:38:31 pm
It works for me (on linux).

Can you please copy the output of the build-log (or more exactly the line with the cb_console_runner-command) and post it here.

And please tell us which version of C::B and which OS you use.
OS is Windows 7.
Code
Executing: "C:\Program Files\CodeBlocks/cb_console_runner.exe" "C:\Users\illi\Documents\Skola\IZP\Projekt-1\bin\Debug\Projekt 1.exe" --wpl 34 < inputs\in.original (in C:\Users\illi\Documents\Skola\IZP\Projekt-1\.)
But there is following problem: Program executed by cb_console_runner gets 5 arguments instead of 3 (program name, --wpl, 3).
console_runner was not designed to handle such (it also makes no sense). Just start a command prompt at where your executable is and run the command from there. Alternatively you can setup a tool in the tools menu very flexibly that does that for you.
I know, but from command line is hard run debugger.