How do you build this for (or on) Windows?
-
ofek commented at 6:54 PM on March 24, 2017: none
-
chfast commented at 8:12 AM on April 26, 2017: none
I'm using CMake to build it. E.g. https://github.com/ethereum/cpp-ethereum/blob/develop/cmake/secp256k1/CMakeLists.txt or #315.
-
ofek commented at 6:44 PM on April 26, 2017: none
I've figured it out https://github.com/ofek/coincurve/blob/master/.travis/prepare_windows_build.sh / https://github.com/ofek/coincurve/blob/master/.travis/build_windows_wheels.sh
Though, I don't know how to build libgmp for Windows for use with libsecp256k1.
-
chfast commented at 7:42 PM on April 26, 2017: none
You can configure libsecp256k1 not to use GMP at all. Option is
--with-bignum=none. -
ofek commented at 7:50 PM on April 26, 2017: none
Oh yes but I'd like to use it. Have you tried building for Windows with gmp?
-
chfast commented at 7:54 PM on April 26, 2017: none
I don't think you can build GMP with Visual Studio. I suggest using MPIR instead. It is compatible with GMP.
-
ofek commented at 8:01 PM on April 26, 2017: none
Looks interesting, thanks!
-
chfast commented at 8:06 PM on April 26, 2017: none
I'm also trying to provide CMake support for it. https://github.com/wbhart/mpir/pull/215.
-
laanwj commented at 8:10 AM on May 7, 2017: member
Including secp256k1 in any project is easy as it's a single-file library. Though if you use another build system make sure that the correct defines for your platform are set, either in
libsecp256k1-config.h(andHAVE_CONFIG_Hset) or otherwise. - gmaxwell closed this on May 29, 2019
-
kroggen commented at 6:10 PM on December 16, 2020: none
Just sharing another method using GitHub Actions and Visual C
- real-or-random cross-referenced this on Mar 23, 2021 from issue General CI discussion by real-or-random