paladinze

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: MacOS上能做作业吗 #12827 Score: 0
    paladinze
    Participant

    Mac上是可以的。虚拟机主要是为了保证环境一致性,提前把依赖准备好了。Mac上需要手动做两件事:
    – 安装依赖:OpenCV,Eigen
    – 更新build配置

    个人开发环境:Mac M1 + Clion编辑器

    安装依赖(推荐通过Homebrew)
    brew install opencv
    brew install eigen

    更新build配置(CMakeLists.txt)
    M1中没有/usr/local/include目录,所以需要调整include_directories,不然会找不到依赖(eigen)相关文件。

    例如修改为:include_directories("/opt/homebrew/Cellar/eigen/3.4.0_1/include/")

    tip:查看homebrew的安装路径:brew list eigen

Viewing 1 post (of 1 total)