chc08 on the commandline - compiler messages on stdout

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

chc08 on the commandline - compiler messages on stdout

ソリューションへジャンプ
1,584件の閲覧回数
vegie_stu
Contributor I
Hi,

As mentioned on an earlier post, I need to use chc08 in a makefile.  I've had no big issues doing this, however I'd like to have compilation errors display on the command shell when the build is broken.

chc08 writes these messages to EDOUT by default, however there's a compiler option -WStdoutOn. From the help file, "This option determines if error file text to the error file is also written into the stdout file."  This looks like what I need, but using it doesn't change anything about the text output:

D:\freescale\Devel_with_makefile>"C:/Program Files/Freescale/CodeWarrior for HC0
8 V5.1/prog/chc08.exe"   -WStdoutOn -Ansi -Isrc/CSP/908ey16 -Isrc -I"c:/Program
Files/Freescale/CodeWarrior for HC08V5.1/lib/hc08c/include" src/main.c -ObjN=%n.
o
D:\freescale\Devel_with_makefile>

... nothing.

Strangely, even trying to print the compiler version on the command line fails:

D:\freescale\Devel_with_makefile>"C:/Program Files/Freescale/CodeWarrior for HC0
8 V5.1/prog/chc08.exe" -V

D:\freescale\Devel_with_makefile>

... still nothing.

Does anyone have this stdout feature working?
Is there a known issue with stderr/stdout not working on the command line?


Thanks!
Stuart

ラベル(1)
タグ(1)
0 件の賞賛
1 解決策
463件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
It's not that the compiler would not print that output to stdout, the problem actually is that cmd.exe does not read it from stdout if the application happens to be a windows application (as opposed to a command line type application).
One way to work around this is to call a real command line application which does nothing else than route through stdin to stdout. The provided little piper.exe actually just does that. Just use
piper.exe chc08.exe -h
, for example.
Note for many usual clients (our own maker, microsofts nmake, many others) the stdout just works fine.
Also output redirection works actually.
chc08.exe -v > out.txt
chc08.exe -v | more
Which make do you try to use?

Daniel

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
464件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
It's not that the compiler would not print that output to stdout, the problem actually is that cmd.exe does not read it from stdout if the application happens to be a windows application (as opposed to a command line type application).
One way to work around this is to call a real command line application which does nothing else than route through stdin to stdout. The provided little piper.exe actually just does that. Just use
piper.exe chc08.exe -h
, for example.
Note for many usual clients (our own maker, microsofts nmake, many others) the stdout just works fine.
Also output redirection works actually.
chc08.exe -v > out.txt
chc08.exe -v | more
Which make do you try to use?

Daniel
0 件の賞賛
463件の閲覧回数
vegie_stu
Contributor I
Hi CompilerGuru,

Thanks for the tip - that's a big help and fixed the problem. There's the tiniest reference to piper.exe in the documentation - I'd never have found it.

I'm using GNU make (3.80).

Cheers,
vegie_stu

0 件の賞賛