English 中文(简体)
甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺、甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺-甲状腺/乙状腺++
原标题:android.mk arm-linux-androideabi-g++ exceptions and __cxa_allocate_exception

我正从源头重建Android(以闪现到设备上, 现在使用模拟器), 试图添加一个单一命令行工具。 我将我的源代码输入 repo/ exernal/... 并写入 < code> Android.mk

我得到了以下未定义的:

__cxa_allocate_exception
__cxa_begin_catch
__cxa_end_catch
__cxa_end_cleanup
__cxa_free_exception
__cxa_get_exception_ptr
__cxa_rethrow
__cxa_throw
__gxx_personality_v0

我用同样的不确定因素 搜索了这里的其他问题 但似乎无法找到安卓的解决方案

最后链接命令生成为 :

prebuilt/darwin-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-g++ -nostdlib -Bdynamic -Wl,-T,build/core/armelf.x -Wl,-dynamic-linker,/system/bin/linker -Wl,--gc-sections -Wl,-z,nocopyreloc -o out/target/product/generic/obj/EXECUTABLES/wavsender_intermediates/LINKED/wavsender -Lout/target/product/generic/obj/lib -Wl,-rpath-link=out/target/product/generic/obj/lib -lc -llog -lcutils -lnetutils -lc -lstdc++ -lm  out/target/product/generic/obj/lib/crtbegin_dynamic.o    out/target/product/generic/obj/EXECUTABLES/wavsender_intermediates/ohSongcast/WavSender/WavSender.o              out/target/product/generic/obj/STATIC_LIBRARIES/liblog_intermediates/liblog.a out/target/product/generic/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a out/target/product/generic/obj/STATIC_LIBRARIES/libopenhome_intermediates/libopenhome.a out/target/product/generic/obj/STATIC_LIBRARIES/libgtest_intermediates/libgtest.a out/target/product/generic/obj/STATIC_LIBRARIES/libstlport_static_intermediates/libstlport_static.a out/target/product/generic/obj/STATIC_LIBRARIES/libstdc++_intermediates/libstdc++.a out/target/product/generic/obj/STATIC_LIBRARIES/libgabi++_intermediates/libgabi++.a   -Wl,-z,noexecstack -Wl,--icf=safe -Wl,--fix-cortex-a8 prebuilt/darwin-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/armv7-a/libgcc.a out/target/product/generic/obj/lib/crtend_android.o

机器人.mk是:

include $(CLEAR_VARS)
LOCAL_MODULE := wavsender
LOCAL_MODULE_TAGS := eng
LOCAL_CFLAGS += -fexceptions -D_GNU_SOURCE -DPLATFORM_ANDROID
LOCAL_SRC_FILES += WavSender.cpp
LOCAL_SHARED_LIBRARIES := libc libcutils libnetutils
LOCAL_STATIC_LIBRARIES := libcutils libopenhome
LOCAL_STATIC_LIBRARIES += libopenhome libgtest libstlport_static libstdc++ libgabi++
LOCAL_LDLIBS += -lstdc++
include external/stlport/libstlport.mk
include $(BUILD_EXECUTABLE)

有没有人能看到一个问题 或者指向我一个方向 来得到正确的行为 从手臂 -linux - 和roideabig++?

问题回答

考虑删除 libstd++++ 在 Android. mk 中作为静态的 libstd++ 。 它应该默认为标准的 Android 执行, 您应该没事 。

事实上,我看到你把它加起来 是一个静态和动态的图书馆

删除静态 libstdc+++ 或动态之一。 如果它不这样做, 它尝试删除两者

你所有的未定定义都是来自 libstdc+++。

通常,当您有不同的 libstdc+++ 版本, 并编译一个特定版本, 与另一个链接, 或者忘记链接时, 就会发生这种情况 。

有时,如果链接是在需要图书馆的图书馆之后完成的,它甚至可以发生。

不久前,我遇到了类似的 __cxa undefines, 这是因为我建了一个在图书馆/共享对象中拉动的项目,有些定义的 APP_STL : = gnustl_ 共享, 而另一些则在应用程序.mk 文件中宣布 gnustl_stistic 。

或许你会遇到类似的事情?如果是这样的话,我建议在综合解决方案中使用其中之一或另一部分,但不是两者兼而有之。





相关问题
handling exceptions IN Action Filters

Is there a better way to handle exceptions that occur inside an Action Filter itself in ASP .NET MVC? There re 2 ways I can think of at the moment. Using a try catch and setting the HTTP Status ...

既可捕获,又可举出例外。

我有一种办法,可以进入亚洲开发银行,因此,我国的亚行在多瑙河航道中的所有 st子都位于一个试捕区。 它正在追捕Kexception

Cross compiler exception handling - Can it be done safely?

I am doing some maintenance on a C++ windows dll library that is required to work with different VC++ compilers (as I don’t want to address different mangling schemes). I have already eliminated any ...

File Handling Issue

I am developing a tool in c#, at one instance I start writing into a xml file continuously using my tool,when i suddenly restart my machine the particular xml file gets corrupted, what is the reason ...

Watch a memory location/install data breakpoint from code?

We have a memory overwrite problem. At some point, during the course of our program, a memory location is being overwritten and causing our program to crash. the problem happens only in release mode. ...

Unit Test for Exceptions Message

Is there a simple (Attribute-driven) way to have the following test fail on the message of the exception. [TestMethod()] [ExpectedException(typeof(ArgumentException))] public void ExceptionTestTest() ...

热门标签