Author

Topic: libsecp256k1 as a library/dll/etc (Read 950 times)

sr. member
Activity: 434
Merit: 270
September 27, 2017, 10:42:45 AM
#13
i am not sure, if this is what you are looking for .,
ref https://github.com/bitcoin-core/secp256k1/issues/451

Quote
You can configure libsecp256k1 not to use GMP at all. Option is --with-bignum=none.
staff
Activity: 4172
Merit: 8419
September 26, 2017, 07:13:38 PM
#12
Libsecp256k1 works fine with no dependencies at all.  You're having dependency issues because you're bypassing the build system and doing something horrible.  Read the fine instructions.  Otherwise it's like drilling into someone's head and then complaining that you have to provide infrastructure to keep the blood circulating or they stop being able to give you advice. Smiley

> mbedTLS will build without any external dependencies, it has its own MPI functions and supports secp256k1 primitives

And is probably not even remotely constant time for it and is probably also super slow...
legendary
Activity: 2097
Merit: 1068
September 26, 2017, 06:55:53 PM
#11
If you can't be bothered to install a dependency then thats hard luck.

mbedTLS will build without any external dependencies, it has its own MPI functions and supports secp256k1 primitives - you're still going to have to download it and build it from scratch though.
sr. member
Activity: 770
Merit: 305
September 25, 2017, 11:22:20 AM
#10
The Windows 10 Creators Fall Update includes the Linux subsystem.
I have Win7 and I do not have time and money want to upgrade to Win10

Quote
I successfully ran bitcoind in the Linux session.
I want to use libsecp256k1 not for bitcoin-related project.
I have some experience running Ubuntu under OracleVM, but the main tool for me now is Windows
full member
Activity: 136
Merit: 120
September 25, 2017, 10:47:37 AM
#9
Here is how you can build them yourself.
Fucking routine! Smiley))))))))
I need two files. One library file and one .h file for compiling my c++ sources for my windows Smiley
I do not want to install addional msys/mingw/compilers/tools/managers/etc/etc/etc
Why the things in modern software development are so complicated?  Grin
I feel your pain Smiley

The Windows 10 Creators Fall Update includes the Linux subsystem.  It allows you to run Linux under Windows with better integration than using a separate virtual machine (such as VirtualBox).  I'm part of the Windows Insider program and I installed Ubuntu without any problems and can directly read/write files in the Windows filesystem from my Ubuntu session (the reverse is not true - you cannot access Linux files from a Windows session).  I successfully ran bitcoind in the Linux session.

Unfortunately, there is no official GUI support in the Linux session, although I have seen reports of people who have gotten Gnome up and running.  I may look into this some more after the Fall Update is officially released (it is getting close - I have been getting new builds every 2-4 days recently).
sr. member
Activity: 770
Merit: 305
September 24, 2017, 10:11:52 AM
#8
Here is how you can build them yourself.
Fucking routine! Smiley))))))))
I need two files. One library file and one .h file for compiling my c++ sources for my windows Smiley
I do not want to install addional msys/mingw/compilers/tools/managers/etc/etc/etc
Why the things in modern software development are so complicated?  Grin
legendary
Activity: 2053
Merit: 1354
aka tonikt
September 24, 2017, 10:06:09 AM
#7
Thanks a lot. I'll try.
The library files are dated by 2016, so I would like to use more current version.

Here is how you can build it yourself.

1. Install MSYS2 and the gcc compiler(s) you want, following the first answer from here: https://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2

2. From the msys shell use "pacman -S ..." command to install the following packages: autoconf, perl, automake-wrapper, libtool, make

3. Fetch the latest sources from https://github.com/bitcoin/bitcoin/ and copy the "src/secp2561k" folder to the "home" of your msys2 shell (you don't need the rest of the core's code - just secp2561k)

4. Go inside the secp2561k folder and excute "./autogen.sh", then "./configure", then "make"

Your lib will be inside the ".libs" folder.
You can do "make install" to install it for you msys2 toolset.
To convert it into a dll, see the bat file from the zip I gave you before.

I might have missed something, so let me know if it didn't work.
staff
Activity: 3374
Merit: 6530
Just writing some code
September 23, 2017, 12:48:56 PM
#6
I tried to do it, but got an error that there is no
(indeed, there is no such file on my disk)
And I am not familar with configure/make/etc tools
Install libgmp. Mingw and cygwin both have their own package manager things and you should be able to install it through those.
sr. member
Activity: 770
Merit: 305
September 23, 2017, 12:46:21 PM
#5
Thanks a lot. I'll try.
The library files are dated by 2016, so I would like to use more current version.
legendary
Activity: 2053
Merit: 1354
aka tonikt
sr. member
Activity: 770
Merit: 305
September 23, 2017, 12:33:09 PM
#3
Sure, but AFAIK, no one publishes builds for it.
You can use mingw or cygwin to compile it and get the .dll/.a files for it.
I tried to do it, but got an error that there is no
(indeed, there is no such file on my disk)
And I am not familar with configure/make/etc tools
staff
Activity: 3374
Merit: 6530
Just writing some code
September 23, 2017, 12:27:24 PM
#2
Is it possible to use a dll for windows or library (.a) file to add it
to current project without installing dependances and compiling sources?
Sure, but AFAIK, no one publishes builds for it.

You can use mingw or cygwin to compile it and get the .dll/.a files for it.
sr. member
Activity: 770
Merit: 305
September 23, 2017, 06:05:27 AM
#1
I want to use libsecp256k1 in my project.
But I can not compile it - there is no in my system.
I use Qt/C++ out-from-the-box package in windows.

Is it possible to use a dll for windows or library (.a) file to add it
to current project without installing dependances and compiling sources?
Jump to: