Issue
i want use malloc lib when i create a new .c file and .h file .android studio tell me 'malloc.h' file not found. I use CMake to compile. is my CMakeLists.txt. I am a ndk rookie.
cmake_minimum_required(VERSION 3.4.1)
add_library(
native-lib
SHARED
native-lib.cpp)
find_library(
log-lib
log)
target_link_libraries(
native-lib
jnigraphics
${log-lib})
This is the cpp folder structure
What modification should I make?
Solution
I know. I need to add a .c file to add_library
.
add_library( # Sets the name of the library.
native-lib
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
native-lib.cpp
stackblur.c)
Answered By - bestphc
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.