weixin_44091709 2022-01-12 01:14 采纳率: 0%
浏览 134

关于出现ld: symbol(s) not found for architecture arm64如何解决

问题遇到的现象和发生背景

用mac编译的时候出现这样错误,用clion、xcode、还有vscode编译都是这样错误。

问题相关代码,请勿粘贴截图
CVector();
CVector(const CVector& vct);
CVector(CVector&& vct);
CVector& operator=(const CVector&cvt);
virtual ~CVector();

uint32_t Insert(uint32_t nPos,uint32_t nVal);//指定位置插入
uint32_t PushHead(uint32_t nVal);//头部插入
uint32_t PushTail(uint32_t nVal);//尾部插入
运行结果及报错内容

Undefined symbols for architecture arm64:
"vtable for CVector", referenced from:
CVector::CVector() in CVecotr-60a999.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我的解答思路和尝试过的方法
我想要达到的结果
  • 写回答

1条回答 默认 最新

  • 猫猫爱吃鱼 2022-01-12 10:11
    关注

    错误信息已经标明,链接需要arm64架构的库,链接时指定的库不是对应硬件架构的吧。

    评论

报告相同问题?

问题事件

  • 创建了问题 1月12日

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料