Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: henry on January 11, 2007, 12:24:51 pm

Title: adding options before RUN
Post by: henry on January 11, 2007, 12:24:51 pm

Hi all,

i am trying to add options before running my program. In command-line i am able to do

myProgram -lwc < fileName
or
myProgram -l -w -c < fileName

In C:B with RUN or (Ctrl-F10) i was only able to start my program without the options.

thx
Title: Re: adding options before RUN
Post by: killerbot on January 11, 2007, 12:26:47 pm
Project menu -> Set Program's arguments
Title: Re: adding options before RUN
Post by: henry on January 11, 2007, 01:09:01 pm

hi again,

thx for the answer. In Project menu -> Set Program's arguments i have selected the target Release and added the following line in Program arguments:

-lwc < file.

When i now  run the program i can see in the log
Executing:
:\Documentations\CBlocks\CB_20070108_rev3466_win32/cb_console_runner.exe "D:\Documentations\C\test\mOut\mOut.exe" -lwc < file (in D:\Documentations\C\test\mOut\.)
.

But unfortunately in my dos windows there is no output?
When i try to abort the program i can see in the log
Aborting process 0 ... Be patient!

However when i do it with the command line i have:
D:\Documentations\C\test\mOut>mOut.exe -lwc < file
----------------------------------
794 Zeichen, 63 Wort, 23 Zeile
----------------------------------
D:\Documentations\C\test\mOut>


thx


Title: Re: adding options before RUN
Post by: MortenMacFly on January 11, 2007, 01:18:14 pm
Executing:
:\Documentations\CBlocks\CB_20070108_rev3466_win32/cb_console_runner.exe "D:\Documentations\C\test\mOut\mOut.exe" -lwc < file (in D:\Documentations\C\test\mOut\.)
.
I believe this is because "< file" is actually passed to cb_console_runner.exe and not to your application. Thomas should know... Thomas: are you online?! ;-)
With regards, Morten.