Sign in to follow this  
AlexBP

Visual Studio, Android NDK, OpenSL ES - undefined reference to slCreateEngine

Recommended Posts

I want to play sound through OpenSL ES. Connected library Linker->Input->Library Dependencies - OpenSLES. The linker produces an error - undefined reference to slCreateEngine.

Share this post


Link to post
Share on other sites

Please give the exact error message, starting immediately before the first error.

 

Also, please verify that the library paths match the location they were installed.

Share this post


Link to post
Share on other sites
1>------ Build started: Project: NativeActivity, Configuration: Debug ARM ------
1>  ANDROID_HOME=C:\Android\SDK
1>  ANT_HOME=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\apache-ant-1.9.3\
1>  JAVA_HOME=C:\Program Files\Java\jdk1.8.0_91
1>  NDK_ROOT=C:\Android\NDK
1>  main.cpp
1>  ARM\Debug\main.o: In function `AppCmd':
1>  C:\Android\NativeActivity/main.cpp:159: undefined reference to `slCreateEngine'
1>  C:\Android\NativeActivity/main.cpp:208: undefined reference to `SL_IID_ENGINE'
1>collect2.exe : error : ld returned 1 exit status

The path is correct. In this path linked against libandroid.so

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this