Keep update by adding git submodule, how to compile?

Hey guys,

I’m fairly new to Cocos2d-x. I know that I can create a cocos2d-x project simply by using xcode template. However, I notice that the engine code is frequently updated, so I want to add cocos2d-x git repository as my submodule, and frequently update it. However, I don’t know how to update my project after cocos2d-x is updated. I tried to make symbolic link like “gitrepo/myproject/libs/cocos2dx” -> “gitrepo/modules/cocos2d-x/cocos2dx”. However, that will lead to compile error and I noticed those mysterious files in platform folder, such as “CCApplication_platform.h” and “CCArchOptimalParticleSystem.h”, which don’t exist in the cocos2d-x project.

Therefore, my question is: Assuming I have a local copy of cocos2d-x git repository, how do I correctly reference to it in my project and keep update?

Thanks!