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的析构函数。实现即可。
好纠结。。。