Author Topic: adding options before RUN  (Read 3914 times)

henry

  • Guest
adding options before RUN
« 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

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: adding options before RUN
« Reply #1 on: January 11, 2007, 12:26:47 pm »
Project menu -> Set Program's arguments

henry

  • Guest
Re: adding options before RUN
« Reply #2 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



Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: adding options before RUN
« Reply #3 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.
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