Getting below error on NDK-build
/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux- x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lrt
I updated Android.mk for absolute path of lrt but issue did not resolve
My Android.mk is here
LOCAL_PATH := $(call my-dir)
THIS_PATH := $(LOCAL_PATH)
include $(CLEAR_VARS)
OPENCV_CAMERA_MODULES := off
OPENCV_INSTALL_MODULES := off
OPENCV_LIB_TYPE := STATIC
OPENCV_ANDROID_SDK_HOME := /home/Ravikant/Desktop/OpenCV-android-sdk
include $(OPENCV_ANDROID_SDK_HOME)/sdk/native/jni/OpenCV.mk
OPENCV_INCLUDE_DIR := $(OPENCV_ANDROID_SDK_HOME)/sdk/native/jni/include
OPENCV_LIBS_DIR := $(OPENCV_ANDROID_SDK_HOME)/sdk/native/libs/$(TARGET_ARCH_ABI)
OPENCV_3RD_PARTY_LIBS_DIR := $(OPENCV_ANDROID_SDK_HOME)/sdk/native/3rdparty/libs/$(TARGET_ARCH_ABI)
LOCAL_MODULE := myModule
LOCAL_CFLAGS := -w
LOCAL_SRC_FILES := searchPath.cpp auxiliary.cpp
LOCAL_LDFLAGS := -fopenmp -llog -ljnigraphics -L$(OPENCV_LIBS_DIR)
LOCAL_SHARED_LIBRARIES += prebuilt_for_opencv_java
-lopencv_core \
-lopencv_highgui \
-lopencv_objdetect \
-lopencv_imgproc \
-lopencv_imgcodecs \
-lopencv_photo
include $(BUILD_SHARED_LIBRARY)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := prebuilt_for_opencv_java
LOCAL_SRC_FILES := $(OPENCV_LIBS_DIR)/libopencv_java3.so
include $(PREBUILT_SHARED_LIBRARY)
Can anyone tell whether its ndk configuration issue or something diffrent.