@cei wrote:
Xcode seems to be doing some kind of wizardry because I can access the whole cocos2d framework without including it and specifying the
cocos2d::
namespace.
This seems to be limited to Xcode however, as Visual Studio wants me import the framework before using it, and requires namespaces to be specified (as I would expect).
As an example, this is accepted by Xcode but throws errors in Visual Studio:Vec2 p = Vec2::ZERO;
whereas this works in both IDEs:
#include "cocos2d.h" cocos2d::Vec2 p = cocos2d::Vec2::ZERO;
Why does Xcode do this? And how can I stop it from doing it?
I need this to avoid some naming conflicts between Apple's
Foundation
framework and cocos2d, which I tried to solve using suggestions found on the forum but without success.EDIT
Just found the wizardry was caused by a preprocessor directive inside
Prefix.pch
.
Posts: 1
Participants: 1