Cocos compile error for android

Hi!
Scroll down to last post, sry if I have made this a little confusing :smile: Thanks!

Try one of these:

  1. #include “cocos2d.h” unless GuiUtils.hpp already includes it (but then you shouldn’t get the errors)
  2. specify type’s namespace (cocos2d::Sprite instead of Sprite) or forward declare everything
    (also remove using namespace cocos2d if you go with option #2)
1 Like

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.

Great i really appreciate your time !
Last one, can’t see the issue here>

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?

1 Like