Author Topic: Wrong number of arguments passed to cb_console_runner  (Read 5845 times)

Offline illi

  • Single posting newcomer
  • *
  • Posts: 3
Wrong number of arguments passed to cb_console_runner
« 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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Wrong number of arguments passed to cb_console_runner
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Wrong number of arguments passed to cb_console_runner
« Reply #2 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.

Offline illi

  • Single posting newcomer
  • *
  • Posts: 3
Re: Wrong number of arguments passed to cb_console_runner
« Reply #3 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.