I am trying to set up FMOD for Android, and have
started with the examples provided in the API for FMOD. I have not managed to set
up a working project. However, I have downloaded a working project for
Android Studio from here: https://github.com/WillCoder/Fmod-Sample-3d
I can build and run this project. The example implemented is
event_parameter.cpp. The c++ files are not included in the project. There are only prebuilt shared libraries. Therefore, I though a good way to start would be to build new shared libraries from another example file in the FMOD API (simple_event.cpp) and exchange the ones in the working project. I have tried to compile new .so files using NDK, but I have not managed to get it working. I
assume something is wrong with the Android.mk file or the project
structure. I have searched for other questions on the topic in the FMOD forum, and in some
answers there are references to examples of Android.mk in the API, but I
haven’t found any examples in the latest FMOD API (1.08). However, I have modified the
Android.mk from the FMOD API 1.04:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := simple_event
LOCAL_SRC_FILES := simple_event.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/inc
include $(BUILD_SHARED_LIBRARY)
I get lots of “undefined reference to” errors in simple_event.cpp, e.g. to Common_Init(void), FMOD::Studio::System::create(FMOD::Studio::System, unsigned int), etc.
Any ideas about what is wrong? Does anyone know of any example of project structures and Android.mk files for the use of FMOD with Android?