C++ Typedef使用不同类型的nsuinteger(又称无符号int)与cdvdestinationtype重新定义
我使用科尔多瓦,导入,在我的项目中,我使用另一个C++风格的库,所以,我的文件必须是*.mm ./p> 问题是,当我编译时,会出现以下错误:C++ Typedef使用不同类型的nsuinteger(又称无符号int)与cdvdestinationtype重新定义,c++,typedef,redefinition,C++,Typedef,Redefinition,我使用科尔多瓦,导入,在我的项目中,我使用另一个C++风格的库,所以,我的文件必须是*.mm ./p> 问题是,当我编译时,会出现以下错误: typedef redefinition with different types nsuinteger (aka unsigned int) vs cdvdestinationtype 此错误在CDVCamera.h中: 问题似乎来自于我混合ObjtoVelc和C++。 我如何解决它?当有人说“typedef nsuiger CDVDestinatio
typedef redefinition with different types nsuinteger (aka unsigned int) vs cdvdestinationtype
此错误在CDVCamera.h中:
问题似乎来自于我混合ObjtoVelc和C++。
我如何解决它?当有人说“typedef nsuiger CDVDestinationType;”表示CDVDestinationType是NSUInteger的typedef,但CDVDestinationType是enum,无法重新定义类型。当您说“typedef NSUInteger CDVDestinationType;”表示CDVDestinationType是NSUInteger的typedef,但CDVDestinationType是enum,无法重新定义类型。
enum CDVDestinationType {
DestinationTypeDataUrl = 0,
DestinationTypeFileUri
};
typedef NSUInteger CDVDestinationType;