summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2014-10-08 14:29:34 +0200
committerAndreas Baumann <abaumann@yahoo.com>2014-10-08 14:29:34 +0200
commit7280e10e8bfa507953d8c823abd502db98c514fa (patch)
tree9c60dad32369be442e659dede923f67e2a9a546c /include
parent4aec1091870aaeec9d64b4bd9d7d143ef4a2bbcc (diff)
downloadcrawler-7280e10e8bfa507953d8c823abd502db98c514fa.tar.gz
crawler-7280e10e8bfa507953d8c823abd502db98c514fa.tar.bz2
some fixes on Windows
Diffstat (limited to 'include')
-rw-r--r--include/luaglue/LuaGlueExportable.hpp26
-rwxr-xr-xinclude/luaglue/LuaVM.hpp16
-rw-r--r--include/util/StringUtils.hpp4
-rwxr-xr-xinclude/util/win32/errormsg.hpp2
-rwxr-xr-xinclude/util/win32/stringutils.hpp2
5 files changed, 40 insertions, 10 deletions
diff --git a/include/luaglue/LuaGlueExportable.hpp b/include/luaglue/LuaGlueExportable.hpp
new file mode 100644
index 0000000..134e3f0
--- /dev/null
+++ b/include/luaglue/LuaGlueExportable.hpp
@@ -0,0 +1,26 @@
+#ifndef __LUAGLUE_EXPORTABLE_H
+#define __LUAGLUE_EXPORTABLE_H
+
+#ifndef _WIN32
+
+#define LUAGLUE_DLL_VISIBLE
+
+#else
+
+#ifdef SHARED
+
+#ifdef BUILDING_LUAGLUE
+#define LUAGLUE_DLL_VISIBLE __declspec(dllexport)
+#else
+#define LUAGLUE_DLL_VISIBLE __declspec(dllimport)
+#endif
+
+#else
+
+#define LUAGLUE_DLL_VISIBLE
+
+#endif // BUILDING_LUAGLUE
+
+#endif // _WIN32
+
+#endif
diff --git a/include/luaglue/LuaVM.hpp b/include/luaglue/LuaVM.hpp
index baa5bca..bd2fd21 100755
--- a/include/luaglue/LuaVM.hpp
+++ b/include/luaglue/LuaVM.hpp
@@ -1,6 +1,8 @@
#ifndef __LUA_VM_H
#define __LUA_VM_H
+#include "LuaGlueExportable.hpp"
+
#include "lua.hpp"
#include <string>
@@ -8,15 +10,15 @@
class LuaVM
{
public:
- LuaVM( );
- ~LuaVM( );
+ LUAGLUE_DLL_VISIBLE LuaVM( );
+ LUAGLUE_DLL_VISIBLE ~LuaVM( );
- void loadSource( const char *sourceFilename );
- void executeMain( );
- void dumpState( );
- void fullGarbageCollect( );
+ LUAGLUE_DLL_VISIBLE void loadSource( const char *sourceFilename );
+ LUAGLUE_DLL_VISIBLE void executeMain( );
+ LUAGLUE_DLL_VISIBLE void dumpState( );
+ LUAGLUE_DLL_VISIBLE void fullGarbageCollect( );
- lua_State *handle( );
+ LUAGLUE_DLL_VISIBLE lua_State *handle( );
private:
void initialize( );
diff --git a/include/util/StringUtils.hpp b/include/util/StringUtils.hpp
index c6b9f87..d0c832e 100644
--- a/include/util/StringUtils.hpp
+++ b/include/util/StringUtils.hpp
@@ -3,6 +3,8 @@
#include <string>
-bool stringicasecmp( const std::string &s1, const std::string &s2 );
+#include "util/UtilExportable.hpp"
+
+UTIL_DLL_VISIBLE bool stringicasecmp( const std::string &s1, const std::string &s2 );
#endif
diff --git a/include/util/win32/errormsg.hpp b/include/util/win32/errormsg.hpp
index 93ce3b7..7bdc582 100755
--- a/include/util/win32/errormsg.hpp
+++ b/include/util/win32/errormsg.hpp
@@ -3,7 +3,7 @@
#include <string>
-#include "UtilExportable.hpp"
+#include "util/UtilExportable.hpp"
UTIL_DLL_VISIBLE std::string getLastError( );
diff --git a/include/util/win32/stringutils.hpp b/include/util/win32/stringutils.hpp
index 8f293dd..976c5cf 100755
--- a/include/util/win32/stringutils.hpp
+++ b/include/util/win32/stringutils.hpp
@@ -3,7 +3,7 @@
#include <string>
-#include "UtilExportable.hpp"
+#include "util/UtilExportable.hpp"
UTIL_DLL_VISIBLE std::wstring s2ws( const std::string &s );