검색결과 리스트
Redirection에 해당되는 글 1건
글
[Code::Blocks] Using redirection as arguments on windows version. (윈도 버전에서 표준입출력 리다이렉션 하기)
In Code::Blocks can set programs arguments in IDE ("Project > Set programs' arguments...")
But in windows version, the redirection is not working.
How to make it enable?
The problem is the 'cb_console_runner.exe'.
That use CreateProcess() function to start the child process.
Unfortunately, CreateProcess() CAN'T handle redirections.
Why does 'cb_console_runner.exe' use this function?
It is written in source code.
//Windows's system() seems to not be able to handle parentheses in
//the path, so we have to launch the program a different way.
( See this svn log. )
So I complied the 'cb_console_runner.exe' using system() instead of CreateProcess().
In my windows7, It works well and it seems that there is no problem about parentheses.
( That was modified in 2006. Now does it fixed?. I don't know. )
Anyway I replaced the 'cb_console_runner.exe' with my own build.
If anyone having a redirection problem in windows version of Code::Blocks, try this one.
(Just copy to where Code::Blocks installs and replace original file with this)
Or you can build it easely with just a few modification. (That's why I didn't attach soruce code.)
I modified and built this in Code::Block. ;)
P.S
영어로 쓰고 나니 진에 빠져서, 한글로 내용을 다시 쓰는건 패스.
도대체 구글링 해도 시원하게 답해주는 사람이 없어서,
직접 원인을 찾아서 수정한 버전을 사용하기로 함.