News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Wrong number of arguments passed to cb_console_runner

Started by illi, October 02, 2009, 04:04:02 PM

Previous topic - Next topic

illi

Hi
I'm making a small program to school and I need redirect file to stdin.
I tried add to Program arguments this:

--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

MortenMacFly

Quote from: illi on October 02, 2009, 04:04:02 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

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.

illi

Quote from: 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.
OS is Windows 7.
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\.)
Quote from: MortenMacFly on October 02, 2009, 04:53:36 PM
Quote from: illi on October 02, 2009, 04:04:02 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.
I know, but from command line is hard run debugger.