# Unable to compile NDK Andoird code with OpenCV. STD Cpp function undefined issue

**URL:** <https://forum.opencv.org/t/unable-to-compile-ndk-andoird-code-with-opencv-std-cpp-function-undefined-issue/19008>\
**Category:** C++\
**Tags:** build, programming\
**Created:** [October 18, 2024, 1:39pm UTC](https://forum.opencv.org/t/unable-to-compile-ndk-andoird-code-with-opencv-std-cpp-function-undefined-issue/19008 "2024-10-18T13:39:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![durgeshmn](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@durgeshmn](https://forum.opencv.org/u/durgeshmn)\
**Post date:** [October 18, 2024, 1:39pm UTC](https://forum.opencv.org/t/unable-to-compile-ndk-andoird-code-with-opencv-std-cpp-function-undefined-issue/19008/1 "2024-10-18T13:39:18Z")

</div>

Hi,

I am trying to integrate OpenCV ver 3\_4\_15 for my android project. I have added required binaries and header files from the native folder. I am facing cpp std function undefined error. Tried with multiple Android NDK options, but nothing is fixing the issue. The compile time build erros :

ld: error: undefined symbol: std::cerr

> > > referenced by common.cpp  
> > > common.cpp.o:(carotene\_o4t::internal::assertSupportedConfiguration(bool)) in archive jni/native/3rdparty/libs/arm64-v8a/libtegra\_hal.a  
> > > referenced by common.cpp  
> > > common.cpp.o:(carotene\_o4t::internal::assertSupportedConfiguration(bool)) in archive jni/native/3rdparty/libs/arm64-v8a/libtegra\_hal.a  
> > > referenced by logger.cpp  
> > > logger.cpp.o:(cv::utils::logging::parseLogLevelConfiguration()) in archive jni/native/staticlibs/arm64-v8a/libopencv\_core.a  
> > > referenced 15 more times

ld: error: undefined symbol: std::basic\_ostream\<char, std::char\_traits \>& std::operator\<\<\<std::char\_traits \>(std::basic\_ostream\<char, std::char\_traits \>&, char const\*)

> > > referenced by common.cpp  
> > > common.cpp.o:(carotene\_o4t::internal::assertSupportedConfiguration(bool)) in archive jni/native/3rdparty/libs/arm64-v8a/libtegra\_hal.a  
> > > referenced by logger.cpp  
> > > logger.cpp.o:(cv::utils::logging::parseLogLevelConfiguration()) in archive jni/native/staticlibs/arm64-v8a/libopencv\_core.a  
> > > referenced by logger.cpp  
> > > logger.cpp.o:(cv::utils::logging::parseLogLevelConfiguration()) in archive jni/native/staticlibs/arm64-v8a/libopencv\_core.a  
> > > referenced 191 more times

ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)  
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
