Jump to content

[9901] Can't compile on linux


Guest Shin Darth

Recommended Posts

Rev: 9901

OS: Linux_x64 (Ubuntu 10.04 64 bit)

Addon: ScriptDev2

Error while compiling:

In file included from ../../../src/game/Player.cpp:24:

../../../src/game/SpellMgr.h:113: error: ‘DamageEffectType’ has not been declared

../../../src/game/SpellMgr.h:114: error: ‘DamageEffectType’ has not been declared

../../../src/game/Player.cpp: In static member function ‘static void Player::DeleteOldCharacters(uint32)’:

../../../src/game/Player.cpp:4272: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘uint64’

Maybe recent changes to SpellMgr have fucked up something?

Link to comment
Share on other sites

Apply this to make compile work. It might be not the best way to fix the problem but it works.

diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 29b74ec..be1241b 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -26,6 +26,7 @@
#include "SpellAuraDefines.h"
#include "DBCStructure.h"
#include "DBCStores.h"
+#include "Unit.h"
#include "Database/SQLStorage.h"

#include "Utilities/UnorderedMap.h"

Link to comment
Share on other sites

This is not good add include for one enum. Any new include in another header make more chance for cross includes when 2 headers include each other.

In like case you will have strange buld errors different at different compilers and compile modes.

More safe way move enum to common included header. And this done in [9903]

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use