aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-02-03 10:24:38 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-02-03 10:24:38 +0800
commitd6f04bcb152c4f57553cd6b20c3c4c660dbecd4d (patch)
tree9fc6d7ae5e59d8ecc5a64b87f7811f6e84cbdbe6
parent38dbea3d9969de39580818e71985f0d7c9b8f58f (diff)
downloaddexon-bls-d6f04bcb152c4f57553cd6b20c3c4c660dbecd4d.tar
dexon-bls-d6f04bcb152c4f57553cd6b20c3c4c660dbecd4d.tar.gz
dexon-bls-d6f04bcb152c4f57553cd6b20c3c4c660dbecd4d.tar.bz2
dexon-bls-d6f04bcb152c4f57553cd6b20c3c4c660dbecd4d.tar.lz
dexon-bls-d6f04bcb152c4f57553cd6b20c3c4c660dbecd4d.tar.xz
dexon-bls-d6f04bcb152c4f57553cd6b20c3c4c660dbecd4d.tar.zst
dexon-bls-d6f04bcb152c4f57553cd6b20c3c4c660dbecd4d.zip
add mk.bat and mklib.bat for windows
-rw-r--r--include/bls.hpp4
-rw-r--r--include/bls_if.h4
-rw-r--r--readme.md10
-rw-r--r--src/bls_if.cpp2
4 files changed, 19 insertions, 1 deletions
diff --git a/include/bls.hpp b/include/bls.hpp
index cf4ea23..8122e09 100644
--- a/include/bls.hpp
+++ b/include/bls.hpp
@@ -11,6 +11,10 @@
#include <iosfwd>
#include <stdint.h>
+#ifdef _MSC_VER
+ #pragma comment(lib, "bls.lib")
+#endif
+
namespace bls {
namespace impl {
diff --git a/include/bls_if.h b/include/bls_if.h
index b45f733..d0c2948 100644
--- a/include/bls_if.h
+++ b/include/bls_if.h
@@ -10,6 +10,10 @@
#include <stdint.h> // for uint64_t, uint8_t
#include <stdlib.h> // for size_t
+#ifdef _MSC_VER
+ #pragma comment(lib, "bls_if.lib")
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/readme.md b/readme.md
index 1df53e6..406ab57 100644
--- a/readme.md
+++ b/readme.md
@@ -25,6 +25,16 @@ To make sample programs, run
make sample_test
```
+# Build and test for Windows
+```
+cd mcl
+mklib
+cd ..\bls
+mklib
+mk test\bls_test.cpp
+bls_test.exe
+```
+
# API
## Basic API
diff --git a/src/bls_if.cpp b/src/bls_if.cpp
index 1611e74..0bea838 100644
--- a/src/bls_if.cpp
+++ b/src/bls_if.cpp
@@ -39,7 +39,7 @@ size_t getStrT(const Outer *p, char *buf, size_t maxBufSize)
}
memcpy(buf, s.c_str(), s.size());
return s.size();
-} catch (std::exception& e) {
+} catch (std::exception&) {
return 0;
}