Jump to content
  • Advertisement
Sign in to follow this  
AlexBP

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

This topic is 601 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
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.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!