简体   繁体   English

如何解决 M1 Mac 中的“未找到架构 arm64 的符号”

[英]How to solve the "symbol(s) not found for architecture arm64" in M1 Mac

new user of Mac OS I can't compile the c++ code. Mac OS 的新用户我无法编译 c++ 代码。

This topic is related to : this and this这个话题是相关的: 这个这个

I tried the methods mentioned but it doesn't work.我尝试了提到的方法,但它不起作用。

Undefined symbols for architecture arm64:
  "Menu::affichageMenu()", referenced from:
      _main in note_soft-276eef.o
  "Menu::setC(int)", referenced from:
      _main in note_soft-276eef.o
  "Menu::choice()", referenced from:
      _main in note_soft-276eef.o
  "Menu::Menu()", referenced from:
      _main in note_soft-276eef.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

```{shell}
I need your help knowing that I rarely use c++ to code.

  [1]: https://stackoverflow.com/questions/32425361/ld-symbols-not-found-for-architecture-x86-64-clang-linker-command-failed
  [2]: https://github.com/exercism/exercism/issues/5476

The problem can be solved with 2 types of actions:该问题可以通过 2 种类型的操作来解决:

  1. manage compilation with cmake使用 cmake 管理编译
  2. or put all files (headers and sources files) in the same directory或将所有文件(头文件和源文件)放在同一目录中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 架构 arm64 的未定义符号:m1 mac - Undefined symbols for architecture arm64: m1 mac cmake 在 Mac 上使用 ARM M1 正在运行 linker 使用 x86_64 架构而不是 arm64 - cmake on Mac with ARM M1 is running linker with x86_64 architecture instead of arm64 Protobuf,ld:找不到体系结构 arm64 的符号 - Protobuf, ld: symbol(s) not found for architecture arm64 在 Mac arm64 架构 (M1) 上使用 ffmpeg 的 mpd 编译错误不清楚 - Unclear compile error for mpd with ffmpeg on Mac arm64 architecture (M1) “架构 arm64 的未定义符号”使用 g++-12 在 M1 mac 上构建基本 SFML 项目 - "Undefined symbols for architecture arm64" building basic SFML project on M1 mac with g++-12 lib-boost ld:找不到架构 arm64 的符号 - lib-boost ld: symbol(s) not found for architecture arm64 提升架构 arm64 的未定义符号 - Boost undefined symbol for architecture arm64 OpenCV C++ 在 Macbook M1 芯片中给出架构 arm64 错误 - OpenCV C++ give architecture arm64 error in Macbook M1 chip C++ 错误:ld:未找到体系结构 arm64 的符号 clang:错误:链接器命令失败,退出代码为 1 - C++ Error: ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 在 M1 Mac 上从 C++ 链接到 curl - arm64 的未定义符号 - Linking to curl from C++ on M1 Mac - undefined symbols for arm64
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM