Cogs.Core
Base.h
1#pragma once
2
3#ifdef _WIN32
4// See: http://msdn.microsoft.com/en-us/library/esew7y1w.aspx
5//
6// This warning is triggered by using classes from STL when exporting our classes from a DLL. The STL classes are
7// not DLL-exported and can therefore not be shared safely between modules. However, we do not expose publicly
8// any of the STL-class members, so the warning can be ignored.
9#pragma warning(disable:4251)
10
11// Expanding a bit-shifted value into larger sized storage is considered a harmless operation.
12#pragma warning(disable:4334)
13#endif
14
15#ifdef EMSCRIPTEN
16 #include <emscripten/emscripten.h>
17#endif
18
19#ifdef _WIN32
20// When building the library:
21 #ifdef COGSCORE_BUILD
22 #ifdef COGSCORE_DLL
23 #define COGSCORE_DLL_API __declspec(dllexport)
24 #endif
25// When using the library:
26 #else
27 #ifdef COGSCORE_DLL
28 #define COGSCORE_DLL_API __declspec(dllimport)
29 #endif
30 #endif
31#endif
32
33#ifdef EMSCRIPTEN
34 #undef COGSCORE_DLL_API
35#endif
36
37#if !defined( COGSCORE_DLL_API )
38 #define COGSCORE_DLL_API
39#endif
40
41#include "Flags.h"
42#include "Bridge/BridgeApi.h"