Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: sd3969682 on January 15, 2012, 09:35:22 am
-
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? :-[
-
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.
-
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.
-
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.
Even easier: Make use of the toll.s menu and it's associated macros.
-
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.
Even easier: Make use of the toll.s menu and it's associated macros.
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!
-
Even easier: Make use of the toll.s menu and it's associated macros.
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!
Try the Tools+ reference (http://wiki.codeblocks.org/index.php?title=Tools%2B_reference).