How do Cocos2d-x project define its EngineRoot macros variables?

How do Cocos2d-x project define its EngineRoot macros variables?
0.0 0


Hi all,

I am trying to create a new C*+ project alongside the existing C*+ project created Cocos2d-x. But, as I compiled it using Visual C*+ 2012, I find that it unable to find “cocos2d.h” file. Having look at the previously created C*+ project, I know that it refer to a EngineRoot macro. Unfortunately, I am unable to find where does this macro get its value.

Any idea about this? Or, actually, how do they manage the C*+ project using Visual C*+ 2012?

Thanks in advance!


I’d like to know the answer to this question as well. I’ve looked at the build files generated and found that EngineRoot is referenced as an environment variable:

    <BuildMacro Include="EngineRoot">

But I’m not able to find where it’s defined either. Could you please help with a direct answer to @ekowibowo’s question?

I’m trying to use cocos2dx in a larger context where I already have existing parts of my game project (server, browser, common libs, test code, etc) being built using a Scons and would like to use the same to build the game client for which I’ve decided to use Cocos2dx.



I found the answer. EngineRoot is defined in the project’s cocos2d_headers.props file near the top as follows:

<PropertyGroup Label="UserMacros">