I checked the source again and found they work fine. Because CCLightning inherited CCRGBAProtocol, it had to
implement the four functions in CCRGBAProtocol class.
I use Microsoft Visual Studio. The behavior of compiler may be somehow different so you may not reproduce the issue.
1>cclightning.h : warning C4819: The file contains a character that cannot be represented in the current code page (950). Save the file in Unicode format to prevent data loss
1>cclightning.cpp(19): error C2057: expected constant expression
1>cclightning.cpp(19): error C2466: cannot allocate an array of constant size 0
1>cclightning.cpp(19): error C2133: 'vertices' : unknown size
1>cclightning.cpp(22): warning C4018: '<' : signed/unsigned mismatch
1>cclightning.cpp(74): warning C4244: '+=' : conversion from 'double' to 'float', possible loss of data
1>cclightning.cpp(76): warning C4244: '+=' : conversion from 'double' to 'float', possible loss of data
1>cclightning.cpp(106): error C2259: 'cocos2d::CCLightning' : cannot instantiate abstract class
1> due to following members:
1> 'void cocos2d::CCRGBAProtocol::setIsOpacityModifyRGB(bool)' : is abstract
1> d:\projects\library\cocos2d-1.0.1-x-0.11.0\cocos2dx\include\ccprotocols.h(66) : see declaration of 'cocos2d::CCRGBAProtocol::setIsOpacityModifyRGB'
1> 'bool cocos2d::CCRGBAProtocol::getIsOpacityModifyRGB(void)' : is abstract
1> d:\projects\library\cocos2d-1.0.1-x-0.11.0\cocos2dx\include\ccprotocols.h(71) : see declaration of 'cocos2d::CCRGBAProtocol::getIsOpacityModifyRGB'
1>cclightning.cpp(118): error C2259: 'cocos2d::CCLightning' : cannot instantiate abstract class
1> due to following members:
1> 'void cocos2d::CCRGBAProtocol::setIsOpacityModifyRGB(bool)' : is abstract
1> d:\projects\library\cocos2d-1.0.1-x-0.11.0\cocos2dx\include\ccprotocols.h(66) : see declaration of 'cocos2d::CCRGBAProtocol::setIsOpacityModifyRGB'
1> 'bool cocos2d::CCRGBAProtocol::getIsOpacityModifyRGB(void)' : is abstract
1> d:\projects\library\cocos2d-1.0.1-x-0.11.0\cocos2dx\include\ccprotocols.h(71) : see declaration of 'cocos2d::CCRGBAProtocol::getIsOpacityModifyRGB'