0

Iam build OpenCV 4.5.4 from source for Android and ABI x64_86, with NDK r21e. Build was success without errors. Then I create a Shared Object project in Visual Studio 2022, where are a simple function to summ 2 Mat objects. In project properies(Release x64) I put refs to include folder "...native\jni\include", and link static(*.a) compiled libs "native\staticlibs\x86_64", "native\3rdparty\libs\x86_64" Linked libs:

opencv_core
ippiw
ittnotify
ippicv
zlib

When I trying to build(Release x64), I have some link errors:

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)

Thanks.

1 Answers1

0

Found solution with -lm flag at Linker/Additional Options. And for me is still a riddle what that flag(-lm) means?

  • Related: [https://stackoverflow.com/questions/44175151/what-is-the-meaning-of-lm-in-gcc](https://stackoverflow.com/questions/44175151/what-is-the-meaning-of-lm-in-gcc) – drescherjm Nov 28 '21 at 18:21