首页 > 解决方案 > 当我尝试使用来自 github 的 GRANSAC 代码时,架构 x86_64 的未定义符号

问题描述

我正在尝试使用此 github 存储库中的 GRANSAC(Generic RANSAC)。https://github.com/drsrinathsridhar/GRANSAC 当我使用 cmake 构建时,会发生此错误,我不知道如何解决。

架构 x86_64 的未定义符号:“_omp_get_max_threads”,引用自:GRANSAC::RANSAC::Estimate(std::__1::vector, std::__1::allocator >

LineFittingSample.cpp.o 中的 const&) LineFittingSample.cpp.o "_omp_get_thread_num" 中的 GRANSAC::RANSAC::RANSAC(),引用自:GRANSAC::RANSAC::Estimate(std::__1::vector, std::__1 ::allocator > const&) 在 LineFittingSample.cpp.o "_omp_set_dynamic" 中,引用自: LineFittingSample.cpp 中的 GRANSAC::RANSAC::Estimate(std::__1::vector, std::__1::allocator > const&)。 o "_omp_set_num_threads",引用自:LineFittingSample.cpp.o ld 中的 GRANSAC::RANSAC::Estimate(std::__1::vector, std::__1::allocator > const&):未找到架构的符号x86_64 clang:错误:链接器命令失败,退出代码 1(使用 -v 查看调用)make[2]:* [LineFittingSample] 错误 1 ​​make[1]:*[CMakeFiles/LineFittingSample.dir/all] 错误 2 make: *** [all]

错误 2

环境:MacOS Mojave 版本 10.14.16

标签: c++c++11cmakeransac

解决方案


推荐阅读