Xcode File was built for unsupported file format

时间:2018-03-09 19:22:41

标签: c++ xcode c++11 terminal architecture

I am trying to compile some code where a file is being read in from the command line. I am entering g++ -std=c++11 main.cpp buglog.txt into terminal in macOS. I wrote the .h and .cpp files in Xcode, when I compile this way, I get the error ld: warning: ignoring file buglog.txt, file was built for unsupported file format ( 0x62 0x31 0x31 0x34 0x33 0x2C 0x52 0x65 0x73 0x6F 0x6C 0x76 0x65 0x64 0x2C 0x53 ) which is not the architecture being linked (x86_64): buglog.txt Does anyone know how to fix this error?

1 个答案:

答案 0 :(得分:1)

答案是不要将buglog.txt传递给编译器。