Hi!
Scroll down to last post, sry if I have made this a little confusing Thanks!
Try one of these:
- #include “cocos2d.h” unless GuiUtils.hpp already includes it (but then you shouldn’t get the errors)
- specify type’s namespace (
cocos2d::Sprite
instead ofSprite
) or forward declare everything
(also removeusing namespace cocos2d
if you go with option #2)
Okay so I added “cocos2d.h” to all the classes that needed it and now the only error I got is this:
The main error that covers them all is this one: vector in namespace std does not make a template type. What to do?
I have tried to include
Thanks!
That error should mean that you aren’t including the std lib header for vector: #include <vector>
. If this is the error you may want to read up and learn about the standard library and modern C++. I’m not sure why it works in IOS, but maybe the prefix header (xxxxx.pch) already includes the vector header, or maybe the cocos2d.h header on iOS ends up including it in a platform specific header.
Not sure on that one. It’s an android specific issue related to an issue with either the Bullet lib or JNIHelper, but the error is hard to read when posting as a scaled down screenshot instead of just pasted text. Maybe someone else knows this one?