Generally speaking, I'm trying to compile a CPP library into my own library as a DLL for Android (or, more accurately, an .so
file). When my toolkit (more on this later) runs the following lines:
arm-linux-androideabi-g++ -Iinclude/common -Iinclude/android -std=gnu++11 --sysroot=c:\android\ndk/platforms/android-19/arch-arm -Ic:\android\ndk/sources/cxx-stl/gnu-libstdc++/4.6/include -Ic:\android\ndk/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=0 -IC:/HaxeToolkit/haxe/lib/hxcpp/3,1,39/include -Iinclude -fpic -fvisibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums "-D_LINUX_STDDEF_H " -Wno -psabi -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit=10000 -DANDROID=ANDROID -Wa,--noexecstack -O2 -DNDEBUG -c -x c++ -frtti ./common/ExternalInterface.cpp -oobj/android-v7/802265c0_ExternalInterface.obj
arm-linux-androideabi-g++ -o../ndll/Android/libopenflgpg-v7.so -frtti -nostdlib -Wl,-shared,-Bsymbolic -Wl,--no-undefined -Wl,-z,noexecstack --sysroot=c:\android\ndk/platforms/android-19/arch-arm -Lc:\android\ndk/platforms/android-19/arch-arm/usr/lib @obj/android-v7/all_objs libs/android/libgpg-v7.a c:\android\ndk/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/libgnustl_static.a c:\android\ndk/platforms/android-19/arch-arm/usr/lib/crtbegin_so.o c:\android\ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.6/libgcc.a c:\android\ndk/platforms/android-19/arch-arm/usr/lib/libc.so c:\android\ndk/platforms/android-19/arch-arm/usr/lib/libm.so -llog -ldl
I get this error (and a ton more just like it):
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: libs/android/libgpg-v7.a: in function gpg::OperationQueue::Impl::StartThreadIfNotRunningLocked():turn_based_match_impl.pb.cc(.text._ZN3gpg14OperationQueue4Impl29StartThreadIfNotRunningLockedEv+0x94): error: undefined reference to 'std::__1::thread::~thread()'
It seems it can't find the std
library; why not? I'm on Windows, with Microsoft Visual Studio C++ 2010 Express installed, if that helps.
More specifically, I'm trying to enable the Google Play Games C++ SDK in Haxe, by using HXCPP to compile an NDLL with all of the functions I'll be able to call using Lib.load
in my Haxe code. The full project is here.
I've tried including typeinfo
and about a dozen other headers to no avail. I admit that C++ is not my strong suit, so I could be overlooking something totally obvious. Thanks for your help!