【问题标题】:/usr/local/lib/gcc/x86_64-apple-darwin10.8.0/4.6.4/libgcc.a warning/usr/local/lib/gcc/x86_64-apple-darwin10.8.0/4.6.4/libgcc.a 警告
【发布时间】:2013-05-08 06:14:21
【问题描述】:

我收到一条涉及 /usr/local/lib/gcc/x86_64-apple-darwin10.8.0/4.6.4/libgcc.a 的警告。我试图使用 Makefile 编译一个 C++ 项目,它显示以下内容:

executeit: bplustree.o nonleafnode.o leafnode.o
    g++ -o executeit bplustree.o nonleafnode.o leafnode.o
bplustree.o: bplustree.cpp
    g++ -g -c bplustree.cpp
nonleafnode.o: nonleafnode.h nonleafnode.cpp
    g++ -g -c nonleafnode.h nonleafnode.cpp
leafnode.o: leafnode.h leafnode.cpp
    g++ -g -c leafnode.h leafnode.cpp
clean:
    rm executeit bplustree.o nonleafnode.o leafnode.o

当我调用“make”时,我在终端中得到以下输出:

g++ -g -c bplustree.cpp
g++ -g -c nonleafnode.h nonleafnode.cpp
g++ -g -c leafnode.h leafnode.cpp
g++ -o executeit bplustree.o nonleafnode.o leafnode.o
ld: warning: in /usr/local/lib/gcc/x86_64-apple-darwin10.8.0/4.6.4/libgcc.a, file was built for unsupported file format which is not the architecture being linked (x86_64)

如您所见,我的 gcc 版本为 4.6.4。我不确定这个警告是否会以任何方式对项目工作构成威胁,但我想知道这个警告的含义以及它是否构成威胁。如果我也能做点什么来删除它,那就太好了。谢谢。

【问题讨论】:

    标签: c++ makefile g++ darwin libgcc


    【解决方案1】:

    我有 Mac OS X 版本 10.6.8。文件 /usr/local/lib/gcc/x86_64-apple-darwin10.8.0/4.6.4/libgcc.a 有“10.8.0”,我安装的这个版本的 gcc 一定把我搞砸了。我不知道我是否可以通过安装 OS X 10.8.0 来消除这个警告,但我现在会考虑回答这个问题。谢谢。

    【讨论】:

      猜你喜欢
      • 2023-03-10
      • 2015-06-11
      • 2012-12-10
      • 1970-01-01
      • 1970-01-01
      • 2017-02-07
      • 2018-07-25
      • 2021-10-21
      • 2022-08-19
      相关资源
      最近更新 更多