View Issue Details

IDProjectCategoryView StatusLast Update
0000846OpenMPTlibopenmptpublic2018-12-30 16:52
Reportermanx Assigned Tomanx  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionOpenMPT 1.27.00.* (old testing) 
Target VersionOpenMPT 1.27.01.00 / libopenmpt 0.3.1 (upgrade first)Fixed in VersionOpenMPT 1.27.01.00 / libopenmpt 0.3.1 (upgrade first) 
Summary0000846: Enable C++11 support on Android
Description

Enable C++11 support on Android.

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Relationships

related to 0001183 resolvedmanx require C++14 
child of 0000836 resolvedmanx Remove support for C++98 and C++03 compilers 

Activities

manx

manx

2016-08-05 09:38

administrator   ~0002544

Last edited: 2016-08-05 09:38

https://developer.android.com/ndk/guides/application_mk.html
https://developer.android.com/ndk/guides/cpp-support.html

Required changes to Application.mk:
APP_CPPFLAGS += -std=c++11
Required changes to Application.mk:
APP_STL := c++_shared
or
APP_STL := gnustl_shared
.
Required changes to Android.mk:
LOCAL_LDLIBS += -latomic
.

Using LLVM libc++ (i.e. APP_STL := c++_shared) is probably the better solution looking forward, as Google is very likely to focus on clang/LLVM.

I have no idea whatsoever what the required Android NDK version would be with these changes. The buildbot is currently on ndk-r9c. The current version is ndk-r12b.

manx

manx

2016-08-05 09:55

administrator   ~0002545

With these changes and a current NDK, the MPT_OS_ANDROID special cases in mptMutex.h and mptThread.h as well as the ANDROID special case in misc_utils.h can be removed.

manx

manx

2016-08-19 19:53

administrator   ~0002617

https://developer.android.com/ndk/downloads/revision_history.html
Apparently, libc++ still has problems with exceptions, so staying with gnustl seems reasonable.

manx

manx

2016-08-20 07:26

administrator   ~0002618

r6932

Issue History

Date Modified Username Field Change
2016-08-05 09:29 manx New Issue
2016-08-05 09:29 manx Status new => assigned
2016-08-05 09:29 manx Assigned To => manx
2016-08-05 09:30 manx Relationship added child of 0000836
2016-08-05 09:38 manx Note Added: 0002544
2016-08-05 09:38 manx Note Edited: 0002544
2016-08-05 09:55 manx Note Added: 0002545
2016-08-19 19:53 manx Note Added: 0002617
2016-08-20 07:25 manx Product Version OpenMPT 1.?? (long term goals) => OpenMPT 1.27.00.* (old testing)
2016-08-20 07:25 manx Target Version => OpenMPT 1.?? (long term goals)
2016-08-20 07:26 manx Status assigned => resolved
2016-08-20 07:26 manx Resolution open => fixed
2016-08-20 07:26 manx Fixed in Version => OpenMPT 1.27.01.00 / libopenmpt 0.3.1 (upgrade first)
2016-08-20 07:26 manx Note Added: 0002618
2016-08-26 09:54 manx Target Version OpenMPT 1.?? (long term goals) => OpenMPT 1.27.01.00 / libopenmpt 0.3.1 (upgrade first)
2018-12-30 16:52 manx Relationship added related to 0001183