target SharedLib: libkehdevRuntime (out/target/product/generic/obj/SHARED_LIBRARIES/libkehdevRuntime_intermediates/LINKED/libkehdevRuntime.so)
/home/eagle/android_source/android_4.2/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/SHARED_LIBRARIES/libkehdevRuntime_intermediates/Channel/DongleChannel.o: in function android::DongleUsbHost::DongleUsbHost():device/project/usbhost1.6/kdeviceservice/Channel/DongleChannel.cpp:14: error: undefined reference to 'vtable for android::DongleUsbHost'/home/eagle/android_source/android_4.2/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/SHARED_LIBRARIES/libkehdevRuntime_intermediates/Channel/DongleChannel.o: in function android::DongleUsbHost::DongleUsbHost():device/project/usbhost1.6/kdeviceservice/Channel/DongleChannel.cpp:14: error: undefined reference to 'VTT for android::DongleUsbHost'
collect2: ld returned 1 exit status
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libkehdevRuntime_intermediates/LINKED/libkehdevRuntime.so] Error 1
在anroid中编译实现的代码,出现以上错误。
原因很简单,忘了实现DongleUsbHost的析构函数。实现即可。
好纠结。。。
本文介绍了一种在Android开发过程中常见的编译错误:链接器未能找到特定类的虚函数表,导致编译失败。通过分析错误日志,指出了解决该问题的方法——添加缺失的析构函数。
3万+

被折叠的 条评论
为什么被折叠?



