【问题标题】:undefined reference to 'log','exp','log10' opencv4.5.4未定义对'log','exp','log10' opencv4.5.4的引用
【发布时间】:2022-01-05 17:01:02
【问题描述】:

我使用 NDK r21e 从 Android 和 ABI x64_86 的源代码构建 OpenCV 4.5.4。 构建成功,没有错误。 然后我在 Visual Studio 2022 中创建一个共享对象项目, 哪里是求和 2 个 Mat 对象的简单函数。 在项目属性(Release x64)中,我将 refs 放入包含文件夹“...native\jni\include”, 并链接静态(*.a)编译的库“native\staticlibs\x86_64”、“native\3rdparty\libs\x86_64” 链接库:

opencv_core
ippiw
ittnotify
ippicv
zlib

当我尝试构建(发布 x64)时,我遇到了一些链接错误:

1> undefined reference to 'log'
1> undefined reference to 'log10'
1> undefined reference to 'exp'
1> undefined reference to 'log'
1> undefined reference to 'exp'
1> undefined reference to 'exp'
1> undefined reference to 'logf'
1> undefined reference to 'logf'
1>clang: error: linker command failed with exit code 1 (use -v to see invocation)

谢谢。

【问题讨论】:

    标签: android c++ opencv shared-libraries


    【解决方案1】:

    找到带有 -lm 标志的解决方案 链接器/附加选项。 对我来说,那个标志(-lm)意味着什么仍然是个谜?

    猜你喜欢
    • 2015-10-02
    • 1970-01-01
    • 2018-11-01
    • 2012-01-19
    • 2011-06-07
    • 2014-08-09
    • 1970-01-01
    • 1970-01-01
    • 2011-03-27
    相关资源
    最近更新 更多