iOS老项目中xcode9.3 导入coco2dx3.16编译通过,但是在项目文件中导入cocos2d.h文件之后就编译不通过,报错如下:
Showing Recent Errors Only
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCComponentContainer.h:65:10: Field has incomplete type 'void'
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCComponentContainer.h:65:10: Expected ';' at end of declaration list
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCComponent.h:71:5: 'virtual' can only appear on non-static member functions
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCComponent.h:71:18: Field has incomplete type 'void'
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCComponent.h:71:18: Expected ';' at end of declaration list
/Users/mac/erban-ios/iOS/cocos2d/cocos/physics/CCPhysicsBody.h:492:5: 'virtual' can only appear on non-static member functions
/Users/mac/erban-ios/iOS/cocos2d/cocos/physics/CCPhysicsBody.h:492:18: Field has incomplete type 'void'
/Users/mac/erban-ios/iOS/cocos2d/cocos/physics/CCPhysicsBody.h:492:18: Expected ';' at end of declaration list
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:1138:5: 'virtual' can only appear on non-static member functions
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:1138:18: Field has incomplete type 'void'
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:1138:18: Expected ';' at end of declaration list
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:2011:13: No matching member function for call to 'removeComponent'
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:2014:22: Cannot initialize a parameter of type 'cocos2d::Component *' with an lvalue of type 'cocos2d::PhysicsBody *'
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:2061:64: Cannot initialize object parameter of type 'const cocos2d::Node' with an expression of type 'const cocos2d::__NodeRGBA'
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:2062:74: Cannot initialize object parameter of type 'const cocos2d::Node' with an expression of type 'const cocos2d::__NodeRGBA'
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:2063:70: Cannot initialize object parameter of type 'cocos2d::Node' with an expression of type 'cocos2d::__NodeRGBA'
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:2064:88: Cannot initialize object parameter of type 'cocos2d::Node' with an expression of type 'cocos2d::__NodeRGBA'
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:2065:75: Cannot initialize object parameter of type 'const cocos2d::Node' with an expression of type 'const cocos2d::__NodeRGBA'
/Users/mac/erban-ios/iOS/cocos2d/cocos/2d/CCNode.h:2066:95: Cannot initialize object parameter of type 'cocos2d::Node' with an expression of type 'cocos2d::__NodeRGBA'
Too many errors emitted, stopping now