diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 89ae588cb..f426a13a6 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -94,6 +94,7 @@ set(lib_SRCS
registerTypes/TypesClientPacks2.cpp
registerTypes/TypesMapObjects1.cpp
registerTypes/TypesMapObjects2.cpp
+ registerTypes/TypesMapObjects3.cpp
registerTypes/TypesPregamePacks.cpp
registerTypes/TypesServerPacks.cpp
)
diff --git a/lib/VCMI_lib.cbp b/lib/VCMI_lib.cbp
index 0bf21859e..aaff61c72 100644
--- a/lib/VCMI_lib.cbp
+++ b/lib/VCMI_lib.cbp
@@ -91,8 +91,6 @@
-
-
@@ -105,8 +103,6 @@
-
-
@@ -185,6 +181,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -205,6 +232,7 @@
+
diff --git a/lib/mapObjects/CObjectClassesHandler.h b/lib/mapObjects/CObjectClassesHandler.h
index 413deea9e..95b32fc49 100644
--- a/lib/mapObjects/CObjectClassesHandler.h
+++ b/lib/mapObjects/CObjectClassesHandler.h
@@ -93,7 +93,7 @@ public:
class CGObjectInstance;
-class AObjectTypeHandler : public boost::noncopyable
+class DLL_LINKAGE AObjectTypeHandler : public boost::noncopyable
{
RandomMapInfo rmgInfo;
diff --git a/lib/registerTypes/TypesMapObjects1.cpp b/lib/registerTypes/TypesMapObjects1.cpp
index 0a12c1fd8..961a16136 100644
--- a/lib/registerTypes/TypesMapObjects1.cpp
+++ b/lib/registerTypes/TypesMapObjects1.cpp
@@ -18,15 +18,6 @@
#include "../NetPacks.h"
#include "../mapObjects/CObjectClassesHandler.h"
-template void registerTypesMapObjectTypes>(CISer& s);
-template void registerTypesMapObjectTypes>(COSer& s);
-template void registerTypesMapObjectTypes>(CISer& s);
-template void registerTypesMapObjectTypes>(COSer& s);
-template void registerTypesMapObjectTypes(CSaveFile & s);
-template void registerTypesMapObjectTypes(CLoadFile & s);
-template void registerTypesMapObjectTypes(CTypeList & s);
-template void registerTypesMapObjectTypes(CLoadIntegrityValidator & s);
-
template void registerTypesMapObjects1>(CISer& s);
template void registerTypesMapObjects1>(COSer& s);
template void registerTypesMapObjects1>(CISer& s);
diff --git a/lib/registerTypes/TypesMapObjects3.cpp b/lib/registerTypes/TypesMapObjects3.cpp
new file mode 100644
index 000000000..83cd20827
--- /dev/null
+++ b/lib/registerTypes/TypesMapObjects3.cpp
@@ -0,0 +1,28 @@
+#include "StdInc.h"
+#include "RegisterTypes.h"
+
+#include "../mapping/CMapInfo.h"
+#include "../StartInfo.h"
+#include "../BattleState.h"
+#include "../CGameState.h"
+#include "../mapping/CMap.h"
+#include "../CModHandler.h"
+#include "../mapObjects/CObjectHandler.h"
+#include "../CCreatureHandler.h"
+#include "../VCMI_Lib.h"
+#include "../CArtHandler.h"
+#include "../CHeroHandler.h"
+#include "../CSpellHandler.h"
+#include "../CTownHandler.h"
+#include "../mapping/CCampaignHandler.h"
+#include "../NetPacks.h"
+#include "../mapObjects/CObjectClassesHandler.h"
+
+template void registerTypesMapObjectTypes>(CISer& s);
+template void registerTypesMapObjectTypes>(COSer& s);
+template void registerTypesMapObjectTypes>(CISer& s);
+template void registerTypesMapObjectTypes>(COSer& s);
+template void registerTypesMapObjectTypes(CSaveFile & s);
+template void registerTypesMapObjectTypes(CLoadFile & s);
+template void registerTypesMapObjectTypes(CTypeList & s);
+template void registerTypesMapObjectTypes(CLoadIntegrityValidator & s);