我尝试编译一些来自第三方SDK的代码时,出现了以下错误。
*Description Resource Path Location Type
deleting object of polymorphic class type ‘Vendor_sys::VendorCode’ which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor] PnServer.cpp /PCounter line 467 C/C++ Problem*
我不知道是否有可能在只了解厂商SDK的一部分知识的情况下满足这个条件,因为大部分重要的工作都是在dll或库对象中完成的。
我的构建环境是Eclipse Juno和gpp。
我在Google上搜索了错误信息,但没有找到任何此错误的实例。
所以,如果我不能修改供应商代码的黑盒子部分,我的选择是什么?
这里是在编译过程中失败的代码:
delete pData->unit;