看板 C_and_CPP 關於我們 聯絡資訊
最近小弟在學習gcc使用,想問一個問題就是 gcc在compile c 或 c++ 檔案時,是否可以 把編譯時候的訊息(error and warnings)log 到一個file裡? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.93.33
james732:gcc (...略) 2> logfile 這樣? 02/05 22:32
yaote:沒有ㄟ.. 02/05 22:47
yaote:有logfile.log 檔案出現,可是沒有東西 02/05 22:47
freehaha:試試 gcc [xxxx] > log 2>&1 02/05 22:51
yaote:回樓上,她會顯示Ambiguous output redirect. 02/05 23:06
ledia:這跟你用什麼 shell 有關, 查一下 redirection 02/06 00:20
mmlover:我也沒有,我用BASH 02/06 07:51
mmlover:我指的事COMPILE ERROR MESSAGE沒有印出 02/06 07:52