Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: Has anyone used Casablanca on Android or iOS?

$
0
0
c2c wrote:
I use NDK_TOOLCHAIN_VERSION=4.7 , I think 4.8 also exist. NDK has prebuilt compiler binaries for use. I don't think that's the issue. The most problematic is that some error indicate a compiler flag issues. I build using ndk-build, you can also build using eclipse (maybe have more success). My co-worker told me but I haven't personally gone that far.
jni/casablanca/include/pplx/pplxtasks.h:956:9: error: 'exception_ptr' in namespace 'std' does not name a type
jni/casablanca/include/pplx/pplxtasks.h: In constructor 'pplx::details::_ExceptionHolder::_ExceptionHolder(const int&, const pplx::details::_TaskCreationCallstack&)':
jni/casablanca/include/pplx/pplxtasks.h:909:34: error: class 'pplx::details::_ExceptionHolder' does not have any field named '_M_stdException'
jni/casablanca/include/pplx/pplxtasks.h: In member function 'void pplx::details::_ExceptionHolder::_RethrowUserException()':
jni/casablanca/include/pplx/pplxtasks.h:948:13: error: 'rethrow_exception' is not a member of 'std'
jni/casablanca/include/pplx/pplxtasks.h:948:36: error: '_M_stdException' was not declared in this scope
/eclipse/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/include/bits/exception_ptr.h:40:4: 
              error: #error This platform does not support exception propagation.
 
This happens because of  a macro called              
#if !defined(_GLIBCXX_ATOMIC_BUILTINS_4)
#  error This platform does not support exception propagation.
#endif
I was having library compilation error during Casablanca build.

Things like

uuid.hpp: swap_range is not part of std
xxpublic.h: FILE does not name a type

and whole a bunch of stuff from pplxlinux.h that shouldn't fail. Maybe include paths are missing.


Android.mk (I only added one source file from Makefile for debugging since that's not even compiling)
Boost output from above steps are used below you might need to specify the full path to the file (or some include path; full path works; in order to include by name other steps might required that I am not familiar with so use full path name to the file is the easiest here). My include paths is pretty messy, maybe there is a better way to do this (oh well)
LOCAL_PATH := $(call my-dir)
LOCAL_CFLAGS += -std=c++11 

include $(CLEAR_VARS)
LOCAL_MODULE    := test
LOCAL_SRC_FILES := src/streams/linux/fileio_linux.cpp


LOCAL_LDLIBS := -llog
LOCAL_LDLIBS += -lz

LOCAL_PCH := src/pch/stdafx.h

LOCAL_CFLAGS += -I/etc/dev/Boost-for-Android-master/boost_1_53_0
LOCAL_CFLAGS += -I/etc/dev/Boost-for-Android-master/boost_1_53_0/boost
LOCAL_CFLAGS += -I/etc/dev/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.7/include
LOCAL_CFLAGS += -I/etc/dev/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi/include
LOCAL_CFLAGS += -I$(LOCAL_PATH)/src/pch
LOCAL_CFLAGS += -I$(LOCAL_PATH)/include
LOCAL_LDLIBS +=  -llibboost_system-gcc-mt-1_53.a -llibboost_thread-gcc-mt-1_53.a -pthread -lm -l/etc/dev/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi/libgnustl_static.a
LOCAL_CPPFLAGS += -H -g -Wall -Winvalid-pch
LOCAL_CPPFLAGS += -fPIC -fexceptions -frtti
LOCAL_CPPFLAGS += -std=c++11
include $(BUILD_SHARED_LIBRARY)
Application,mk
APP_PROJECT_PATH := /etc/dev/casablanca/Release
APP_MODULES := test
APP_PLATFORM := android-8
APP_OPTIM := debug
NDK_TOOLCHAIN_VERSION=4.7
APP_GNUSTL_CPP_FEATURES := rtti exceptions
I have given up on this for now and I don't have much time to spend on this (and we have given up Casablanca for Android for now). I hope to see this SDK to be truly cross-platform (ie: Android/iOS/win) in the future.
Hi,

What's about your errors? Did you achieved to use casablanca within Android NDK.

Should I wait for an official release for Android?

I also need to use a REST library with Android

Thanks!!

Viewing all articles
Browse latest Browse all 4845

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>