Advertisement Jump to content
Sign in to follow this  

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

This topic is 780 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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>  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

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!