Hi. I wanted to make app on Android, so I downloaded SFML<andfixes branch>, got it compiled and made project from example files. But when I build it with ndk-build, I get these errors:
jni/main.cpp:11: error: undefined reference to 'sf::String::String(char const*, std::__1::locale const&)'
jni/main.cpp:13: error: undefined reference to 'sf::Texture::loadFromFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sf::Rect<int> const&)'
jni/main.cpp:20: error: undefined reference to 'sf::Music::openFromFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
My Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := sfml-example
LOCAL_SRC_FILES := main.cpp
LOCAL_LDLIBS := -llog -landroid -lEGL
LOCAL_STATIC_LIBRARIES := sfml-main
LOCAL_SHARED_LIBRARIES := sfml-system
LOCAL_SHARED_LIBRARIES += sfml-window
LOCAL_SHARED_LIBRARIES += sfml-graphics
LOCAL_SHARED_LIBRARIES += sfml-audio
LOCAL_SHARED_LIBRARIES += sfml-network
LOCAL_STATIC_LIBRARIES += android_native_app_glue
include $(BUILD_SHARED_LIBRARY)
$(call import-module,sfml)
and my Application.mk
NDK_TOOLCHAIN_VERSION := 4.8
APP_PLATFORM := android-9
APP_STL := c++_shared
APP_ABI := armeabi
APP_CPPFLAGS := -std=c++0x
APP_MODULES := sfml-activity sfml-example
Code is SFML example.
If I compile with another APP_STL option, apk gets compiled, but doesn't want to work.