Adrian Ivasku
Adrian Ivasku

Reputation: 1118

Cricket audio engine CMAKE

Did anyone implemeted Cricket audio engine (http://www.crickettechnology.com/blog/) for Android Studio using gradle and Cmake (Android NDK) ?

I have imported the lib in my Cmake like this:

target_link_libraries(test
${CMAKE_CURRENT_SOURCE_DIR}/../../test/cricketaudio/lib/libck.a)

And the compiler sees it alright but when I try to run it, the linker gives me this error:

Error while executing process    
[1/1] Linking CXX shared library 
..\..\..\..\build\intermediates\cmake\development\debug\obj\armeabi-
v7a\libtest.so
FAILED: cmd.exe -soname,libtest.so -o 
..\..\..\..\build\intermediates\cmake\development\debug\obj\armeabi-
v7a\libtest.so @CMakeFiles/test.rsp  && cd ."
core/system_android.cpp:174: error: undefined reference to 
'android_getCpuFamily'
core/system_android.cpp:187: error: undefined reference to 
'android_getCpuFeatures'
core/system_android.cpp:210: error: undefined reference to 
'android_getCpuCount'
clang++.exe: error: linker command failed with exit code 1 (use -v to see 
invocation)
ninja: build stopped: subcommand failed.

I am aware that libck (cricket audio) has a dependency lib the Android NDK cpufeauters lib which is located in the Android NDK bundle (Android\Sdk\ndk-bundle\sources\android\cpufeatures).

I don`t know how to make this cpufeatures lib visible to the Linker of my project ???

Any help or pointers would be appreciated.

Upvotes: 1

Views: 325

Answers (1)

Adrian Ivasku
Adrian Ivasku

Reputation: 1118

I have simply included the cpu-features.c and header file to my cmakelist and now it works :).

Upvotes: 1

Related Questions