forked from albertz/commandergenius
-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build problem with libc++ #105
Comments
I've also moved SDL repo to c++_shared library, because it is recommended
by NDK documentation. To use it, add c++_shared to CompiledLibraries
in AndroidAppSettings.cfg
Sorry for late reply.
…On Tue, 18 Jun 2019, 17:39 Iuri Fiedoruk, ***@***.***> wrote:
Hello.
I am trying to move from my own build system to the one from your SDL and
also moving to clang from gcc, as support for gcc was dropped by google and
we'll need to build for arm-64.
Anyway, when building, I got error with some basic C++ stuff on linker:
/home/iuri/Programas/android-studio/sdk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/ostream:275:
error: undefined reference to 'std::uncaught_exception()'
/home/iuri/Programas/android-studio/sdk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/new:320:
error: undefined reference to 'operator delete(void*)'
/home/iuri/Programas/android-studio/sdk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/new:239:
error: undefined reference to 'operator new(unsigned int)'
The solution was to add AppLdflags='-lstdc++'. That fixes the build. But
the thing is that, when running the app, it gives this error:
06-18 11:19:01.328 22704 22720 E AndroidRuntime:
java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so"
not found
While I can change your script to copy this shared library from the NDK to
the libs folder so the generated APK will contain it, I wanted to know if I
am doing something wrong in the build in first place.
I had to include llvm-libc++ dirs for it to find the headers, so that may
be the reason:
AppCppflags='-DANDROID -DHANDHELD -std=c++11
-I/home/iuri/Programas/android-studio/sdk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include
-I. -I./rockdroid -I./rockdroid/aux_tools -I./rockdroid/character
-I./rockdroid/character/movement -I./rockdroid/file
-I./rockdroid/file/format -I./rockdroid/file/v4 -I./rockdroid/graphic
-I./rockdroid/objects -I./rockdroid/options -I./rockdroid/ports/android
-I./rockdroid/scenes'
Also, I am using lastest ndk (r20) and APP_PLATFORM=android-21
Thanks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#105?email_source=notifications&email_token=AABF5QET2I6EO75NB74SDA3P3DXTJA5CNFSM4HZAY55KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2FHWWQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABF5QDJ2UWTKRJUJJCB2MLP3DXTJANCNFSM4HZAY55A>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.
I am trying to move from my own build system to the one from your SDL and also moving to clang from gcc, as support for gcc was dropped by google and we'll need to build for arm-64.
Anyway, when building, I got error with some basic C++ stuff on linker:
/home/iuri/Programas/android-studio/sdk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/ostream:275: error: undefined reference to 'std::uncaught_exception()'
/home/iuri/Programas/android-studio/sdk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/new:320: error: undefined reference to 'operator delete(void*)'
/home/iuri/Programas/android-studio/sdk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include/new:239: error: undefined reference to 'operator new(unsigned int)'
The solution was to add AppLdflags='-lstdc++'. That fixes the build. But the thing is that, when running the app, it gives this error:
06-18 11:19:01.328 22704 22720 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found
While I can change your script to copy this shared library from the NDK to the libs folder so the generated APK will contain it, I wanted to know if I am doing something wrong in the build in first place.
I had to include llvm-libc++ dirs for it to find the headers, so that may be the reason:
AppCppflags='-DANDROID -DHANDHELD -std=c++11 -I/home/iuri/Programas/android-studio/sdk/android-ndk-r20/sources/cxx-stl/llvm-libc++/include -I. -I./rockdroid -I./rockdroid/aux_tools -I./rockdroid/character -I./rockdroid/character/movement -I./rockdroid/file -I./rockdroid/file/format -I./rockdroid/file/v4 -I./rockdroid/graphic -I./rockdroid/objects -I./rockdroid/options -I./rockdroid/ports/android -I./rockdroid/scenes'
Also, I am using lastest ndk (r20) and APP_PLATFORM=android-21
Thanks.
The text was updated successfully, but these errors were encountered: