User forums > Using Code::Blocks

adding options before RUN

(1/1)

henry:

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

killerbot:
Project menu -> Set Program's arguments

henry:

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


MortenMacFly:

--- Quote from: henry on January 11, 2007, 01:09:01 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\.).

--- End quote ---
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.

Navigation

[0] Message Index

Go to full version