Sfoglia il codice sorgente

Little changes to fix broken gcc compilation, hope MSVC still compile

Vadim Glazunov 17 anni fa
parent
commit
1bd3a677fe
4 ha cambiato i file con 13 aggiunte e 2 eliminazioni
  1. 2 0
      CGameState.h
  2. 1 1
      lib/Connection.h
  3. 9 1
      lib/VCMI_Lib.h
  4. 1 0
      server/CGameHandler.h

+ 2 - 0
CGameState.h

@@ -1,6 +1,8 @@
 #ifndef CGAMESTATE_H
 #define CGAMESTATE_H
 #include "global.h"
+#include "../hch/CCreatureHandler.h"
+#include "lib/VCMI_Lib.h"
 #include <set>
 #include <vector>
 #ifdef _WIN32

+ 1 - 1
lib/Connection.h

@@ -237,7 +237,7 @@ public:
 	void loadPointer(T &data)
 	{
 		std::cout<<"Allocating memory for pointer!"<<std::endl;
-		typedef boost::remove_pointer<T>::type npT;
+		typedef typename boost::remove_pointer<T>::type npT;
 		data = new npT;
 		*this >> *data;
 	}

+ 9 - 1
lib/VCMI_Lib.h

@@ -1,3 +1,5 @@
+#ifndef VCMI_LIB_H
+#define VCMI_LIB_H
 #include "../global.h"
 
 class CLodHandler;
@@ -55,7 +57,13 @@ public:
 	//StartInfo scenarioOps;
 };
 
+#ifndef __GNUC__
+DLL_EXPORT LibClasses * VLC;
+#else
 extern DLL_EXPORT LibClasses * VLC;
+#endif
 
 
-DLL_EXPORT void initDLL(CLodHandler *b);
+DLL_EXPORT void initDLL(CLodHandler *b);
+
+#endif //VCMI_LIB_H

+ 1 - 0
server/CGameHandler.h

@@ -3,6 +3,7 @@
 #include <set>
 #include "../CGameState.h"
 #include "../lib/Connection.h"
+#include <boost/thread.hpp>
 class CVCMIServer;
 class CGameState;
 //class CConnection;