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

Started by
1 comment, last by AlexBP 7 years, 4 months ago

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

Advertisement

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.


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

This topic is closed to new replies.

Advertisement