From d6f04bcb152c4f57553cd6b20c3c4c660dbecd4d Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Fri, 3 Feb 2017 11:24:38 +0900 Subject: add mk.bat and mklib.bat for windows --- include/bls.hpp | 4 ++++ include/bls_if.h | 4 ++++ readme.md | 10 ++++++++++ src/bls_if.cpp | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) 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 #include +#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 // for uint64_t, uint8_t #include // 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; } -- cgit v1.2.3