每當我嘗試編譯我的項目(在命令行g++ *.hpp *.cpp 2> log.txt
),這就是我得到:G ++警告:不支持的文件格式,內置這是不被連接的架構
log.txt
:
ld: warning: in configfile.hpp, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: in erase.hpp, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: in filehandler.hpp, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: in insert.hpp, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: in operation.hpp, file was built for unsupported file format which is not the architecture being linked (x86_64)
爲什麼會發生這種情況的任何想法?我在OSX 10.6下(使用最新的開發工具)
編譯頭文件會生成預編譯的頭文件,這是編譯過程的一部分。他的錯誤與鏈接階段有關。 – flumpb 2010-12-17 05:29:29
@kisplit - 我想看看他一步一步提煉出有用的東西,然後他可以預編譯。他似乎並不瞭解這裏的過程,所以我認爲一次一小步就可以爲他服務。 – KevinDTimm 2010-12-17 05:38:58