【发布时间】:2018-08-18 10:30:02
【问题描述】:
我正在尝试编译一些从命令行读取文件的代码。我在 macOS 的终端中输入g++ -std=c++11 main.cpp buglog.txt。我在 Xcode 中编写了 .h 和 .cpp 文件,当我以这种方式编译时,我收到错误 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 有人知道如何解决此错误吗?
【问题讨论】:
-
什么是
buglog.txt?您为什么要尝试使用(非代码?)文本文件进行构建? -
ld描述的是 16 字节字符串“b1143,Resolved,S”。绝对不是你想要的。
标签: c++ xcode c++11 terminal architecture