Hi, roschuma, thank you for your help. I can build version 2.4 successfully now.
But when i built executable sample "bingrequest", some link error happened.
but it fails on both linux and os x
But when i built executable sample "bingrequest", some link error happened.
wangqiang@ubuntu:~/cpprest/jni$ ~/android-ndk-r10/ndk-build
[x86] Executable : bingrequest
/home/wangqiang/cpprest/jni/../include/pplx/pplxcancellation_token.h:231: error: undefined reference to 'pplx::details::platform::GetCurrentThreadId()'
/home/wangqiang/cpprest/jni/../include/pplx/pplxcancellation_token.h:563: error: undefined reference to 'pplx::details::platform::GetCurrentThreadId()'
/home/wangqiang/cpprest/jni/../include/pplx/pplxlinux.h:213: error: undefined reference to 'pplx::details::platform::GetCurrentThreadId()'
/home/wangqiang/cpprest/jni/../include/pplx/pplxlinux.h:213: error: undefined reference to 'pplx::details::platform::GetCurrentThreadId()'
/home/wangqiang/casablanca/Release/src/pplx/pplx.cpp:61: error: undefined reference to 'pplx::details::platform::YieldExecution()'
/home/wangqiang/casablanca/Release/include/pplx/pplxlinux.h:250: error: undefined reference to 'vtable for pplx::details::linux_scheduler'
/home/wangqiang/android-ndk-r10/toolchains/x86-4.8/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.8/../../../../i686-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/home/wangqiang/cpprest/obj/local/x86/bingrequest] Error 1
I search the statement "GetCurrentThreadId" in Release folder, the result is:include/pplx/pplxlinux.h: auto id = ::pplx::details::platform::GetCurrentThreadId();
include/pplx/pplxlinux.h: _ASSERTE(_M_owner == ::pplx::details::platform::GetCurrentThreadId());
include/pplx/pplxwin.h: _PPLXIMP long __cdecl GetCurrentThreadId();
include/pplx/pplxwin.h: auto id = ::pplx::details::platform::GetCurrentThreadId();
include/pplx/pplxwin.h: _ASSERTE(_M_owner == ::pplx::details::platform::GetCurrentThreadId());
include/pplx/pplxcancellation_token.h: long tid = ::pplx::details::platform::GetCurrentThreadId();
include/pplx/pplxcancellation_token.h: if (tid == ::pplx::details::platform::GetCurrentThreadId())
src/pplx/pplxlinux.cpp: _PPLXIMP long GetCurrentThreadId()
src/pplx/pplxwin.cpp: _PPLXIMP long __cdecl GetCurrentThreadId()
src/pplx/pplxwin.cpp: return (long)(::GetCurrentThreadId());
src/pplx/pplxapple.cpp: _PPLXIMP long GetCurrentThreadId()
Then i look into the coppers.a, but there is no implement in it:wangqiang@ubuntu:~/casablanca/Build_android/build/build.x86.debug/Binaries$ ar -t libcpprest.a
fileio_posix.cpp.o
json.cpp.o
json_parsing.cpp.o
json_serialization.cpp.o
asyncrt_utils.cpp.o
web_utilities.cpp.o
pplx.cpp.o
threadpool.cpp.o
uri.cpp.o
uri_builder.cpp.o
uri_parser.cpp.o
http_msg.cpp.o
http_helpers.cpp.o
http_client_msg.cpp.o
http_client_asio.cpp.o
x509_cert_utilities.cpp.o
http_server_asio.cpp.o
http_listener.cpp.o
http_listener_msg.cpp.o
http_server_api.cpp.o
oauth1.cpp.o
oauth2.cpp.o
ws_msg.cpp.o
ws_client.cpp.o
ws_client_wspp.cpp.o
base64.cpp.o
x509_cert_utilities_android.cpp.o
BTW, i can clone the source code from the respository:https://git01.codeplex.com/casablanca on windowsbut it fails on both linux and os x