→ phloke:嗯 問題解決了,原來是這樣阿 11/06 23:10
※ 引述《phloke ()》之銘言:
: Makefile的內容跟老師提供的一樣
: 在command line輸入make之後出現:
: make: Warning: File `Makefile' has modification time 7.1 s in the future
: g++ -o hw2-p5 -g -Wall hw2-p5.cpp
: make: warning: Clock skew detected. Your build may be incomplete.
: 雖然有跑出executable,而且執行也沒有問題,
: 可是我不知道這些warning要怎麼解決,有沒有
: 人可以幫我解惑? 感激不盡~
Make 會去比較檔案與目標執行檔的時間已決定是否要重新 build
照道理來說目標執行檔的產生時間無論如何都要比原始碼最後修改的時間
相同或是還要前面
但是如果 compile 的 machine 與儲存的 machine 是在工作站上的不同機器的話
就很有可能會產生時間上的一點點 skew
而有以上的 warning
基本上是沒有關係 如果擔心的話可以馬上在 make 一遍 warning 應該就會消失
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.121.130.225