【问题标题】:Xcode File was built for unsupported file format [closed]Xcode File 是为不受支持的文件格式构建的 [关闭]
【发布时间】: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


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-04-28
    • 2013-03-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-25
    • 1970-01-01
    • 2019-05-25
    相关资源
    最近更新 更多