Cuberite Forum
[FIXED] Error while compiling on a Mac - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: [FIXED] Error while compiling on a Mac (/thread-1530.html)



[FIXED] Error while compiling on a Mac - SamJBarney - 07-11-2014

So I've started the Component Rewrite, finally have the time, and I get this error when I try to compile my code:

Quote:In file included from /Volumes/Storage/dev/MCServer/src/Mobs/AIAgresssiveComponent.cpp:1:
In file included from /Volumes/Storage/dev/MCServer/src/Mobs/AIAgressiveComponent.h:2:
In file included from /Volumes/Storage/dev/MCServer/src/Mobs/AIComponent.h:2:
In file included from /Volumes/Storage/dev/MCServer/src/Mobs/Monster.h:4:
In file included from /Volumes/Storage/dev/MCServer/src/Mobs/../Entities/Pawn.h:4:
In file included from /Volumes/Storage/dev/MCServer/src/Mobs/../Entities/Entity.h:4:
In file included from /Volumes/Storage/dev/MCServer/src/Mobs/../Entities/../Item.h:12:
In file included from /Volumes/Storage/dev/MCServer/src/./Defines.h:4:
/Volumes/Storage/dev/MCServer/src/./ChatColor.h:12:15: error: use of undeclared identifier 'std'
static const std::string Color;

I'm sure I am missing something really simple that I need to be doing. What am I missing?


RE: Help! - xoft - 07-11-2014

Might be related to precompiled headers. Make sure to #include "Globals.h" at the top of each cpp file.


RE: Error while compiling on a Mac - SamJBarney - 07-11-2014

Thanks. That fixed it.
Its been so long since I've written anything for MCServer I've forgotten the small things that need to happen.