User forums > Using Code::Blocks
Unable to set redirection in windows
sd3969682:
I have a really annoying problem.
When I using codeblock in windows and setting the program's arguments such as:
-someCommand <input.txt >output.txt
The redirecting just doesn't work!
It still ask me to input from my screen(keyboard), but not from the file.
However, it does work in DOS or even codeblock in ubuntu.
I intend to programming in windows. Thus, anyone who can help? :-[
zabzonk:
That's because they are the program's arguments, not the shell's. In other words, the redirection characters are simply passed to the program as part of the argc/argv parameters. I'm surprised it works on Ubuntu though.
Alpha:
A workaround would be to to have Code::Blocks execute your command in a post-build step or a commands only target, or if that does not work, write a batch file with your command in it, and have Code::Blocks execute the batch file.
MortenMacFly:
--- Quote from: Alpha on January 15, 2012, 08:40:42 pm ---A workaround would be to to have Code::Blocks execute your command in a post-build step or a commands only target, or if that does not work, write a batch file with your command in it, and have Code::Blocks execute the batch file.
--- End quote ---
Even easier: Make use of the toll.s menu and it's associated macros.
sd3969682:
--- Quote from: MortenMacFly on January 15, 2012, 10:01:01 pm ---
--- Quote from: Alpha on January 15, 2012, 08:40:42 pm ---A workaround would be to to have Code::Blocks execute your command in a post-build step or a commands only target, or if that does not work, write a batch file with your command in it, and have Code::Blocks execute the batch file.
--- End quote ---
Even easier: Make use of the toll.s menu and it's associated macros.
--- End quote ---
Oh! I found that. But I'm new with that and don't know what to do.
Can you give me a simple example? Thanks a lot!
Also thanks Neil and alpha!
Navigation
[0] Message Index
[#] Next page
Go to full version