Libsecp256k1 As A Library - DLL - Etc

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Bitcoin Forum

March 18, 2022, 03:58:39 PM

Welcome, Guest. Please login or register.

News: Latest Bitcoin Core release: 22.0 [Torrent] Search

HOME HELP SEARCH LOGIN REGISTER MORE

Bitcoin Forum > Bitcoin > Development & Technical Discussion > libsecp256k1 as a library/dll/etc

« previous topic next topic »


Pages: [1] print

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

amaclin1 libsecp256k1 as a library/dll/etc


#1
Sr. Member September 23, 2017, 10:05:27 AM

I want to use libsecp256k1 in my project.


Activity: 686
But I can not compile it - there is no <gmp.h> in my system.
Merit: 280 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?

Bitcoin SV GUI client for Windows and Linux


https://github.com/AlisterMaclin/bitcoin-sv/releases

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.

achow101 Re: libsecp256k1 as a library/dll/etc


#2
Moderator September 23, 2017, 04:27:24 PM
Legendary
Quote from: amaclin1 on September 23, 2017, 10:05:27 AM

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?
Activity: 2702
Merit: 4535 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.

Just writing some code

Bitcoin Core contributor | Tip Me! | GitHub | GPG Key Fingerprint 0x17565732E08E5E41

amaclin1 Re: libsecp256k1 as a library/dll/etc


#3
Sr. Member September 23, 2017, 04:33:09 PM

Quote from: achow101 on September 23, 2017, 04:27:24 PM

Activity: 686 Sure, but AFAIK, no one publishes builds for it.
Merit: 280 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 <gmp.h>


(indeed, there is no such file on my disk)
And I am not familar with configure/make/etc tools

Bitcoin SV GUI client for Windows and Linux


https://github.com/AlisterMaclin/bitcoin-sv/releases

piotr_n Re: libsecp256k1 as a library/dll/etc


#4
Legendary September 23, 2017, 04:39:17 PM

Try this, if you want: https://sourceforge.net/projects/gocoin/files/secp256k1_win.zip/download


Activity: 2054
Merit: 1177

aka tonikt

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB 9059 1BE7 B545 CDF3 FD0E

amaclin1 Re: libsecp256k1 as a library/dll/etc


#5
Sr. Member September 23, 2017, 04:46:21 PM

Quote from: piotr_n on September 23, 2017, 04:39:17 PM

Activity: 686 Try this, if you want: https://sourceforge.net/projects/gocoin/files/secp256k1_win.zip/download


Merit: 280
Thanks a lot. I'll try.
The library files are dated by 2016, so I would like to use more current version.

Bitcoin SV GUI client for Windows and Linux


https://github.com/AlisterMaclin/bitcoin-sv/releases

achow101 Re: libsecp256k1 as a library/dll/etc


#6
Moderator September 23, 2017, 04:48:56 PM
Legendary
Quote from: amaclin1 on September 23, 2017, 04:33:09 PM

I tried to do it, but got an error that there is no <gmp.h>


(indeed, there is no such file on my disk)
Activity: 2702 And I am not familar with configure/make/etc tools
Merit: 4535
Install libgmp. Mingw and cygwin both have their own package manager things and you should be able to install it through those.

Just writing some code

Bitcoin Core contributor | Tip Me! | GitHub | GPG Key Fingerprint 0x17565732E08E5E41

piotr_n Re: libsecp256k1 as a library/dll/etc


#7
Legendary September 24, 2017, 02:06:09 PM

Quote from: amaclin1 on September 23, 2017, 04:46:21 PM


Quote from: piotr_n on September 23, 2017, 04:39:17 PM
Activity: 2054
Merit: 1177 Try this, if you want: https://sourceforge.net/projects/gocoin/files/secp256k1_win.zip/download

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.


aka tonikt
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.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB 9059 1BE7 B545 CDF3 FD0E

amaclin1 Re: libsecp256k1 as a library/dll/etc


#8
Sr. Member September 24, 2017, 02:11:52 PM

Quote from: piotr_n on September 24, 2017, 02:06:09 PM

Activity: 686 Here is how you can build them yourself.


Merit: 280
Fucking routine! ))))))))
I need two files. One library file and one .h file for compiling my c++ sources for my windows
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?

Bitcoin SV GUI client for Windows and Linux


https://github.com/AlisterMaclin/bitcoin-sv/releases

ScripterRon Re: libsecp256k1 as a library/dll/etc


#9
Full Member September 25, 2017, 02:47:37 PM

Quote from: amaclin1 on September 24, 2017, 02:11:52 PM


Quote from: piotr_n on September 24, 2017, 02:06:09 PM
Activity: 136
Merit: 115 Here is how you can build them yourself.

Fucking routine! ))))))))


I need two files. One library file and one .h file for compiling my c++ sources for my windows
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?

I feel your pain

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).

amaclin1 Re: libsecp256k1 as a library/dll/etc


#10
Sr. Member September 25, 2017, 03:22:20 PM

Quote from: ScripterRon on September 25, 2017, 02:47:37 PM

Activity: 686 The Windows 10 Creators Fall Update includes the Linux subsystem.
Merit: 280
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

Bitcoin SV GUI client for Windows and Linux


https://github.com/AlisterMaclin/bitcoin-sv/releases

samson Re: libsecp256k1 as a library/dll/etc


#11
Legendary September 26, 2017, 10:55:53 PM

If you can't be bothered to install a dependency then thats hard luck.


Activity: 2090
Merit: 1062 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.

gmaxwell Re: libsecp256k1 as a library/dll/etc


#12
Moderator September 26, 2017, 11:13:38 PM
Legendary
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.

Activity: 3640 > mbedTLS will build without any external dependencies, it has its own MPI functions and supports secp256k1 primitives
Merit: 6016
And is probably not even remotely constant time for it and is probably also super slow...

btctousd81 Re: libsecp256k1 as a library/dll/etc


#13
Sr. Member September 27, 2017, 02:42:45 PM

i am not sure, if this is what you are looking for .,


Activity: 434 ref https://github.com/bitcoin-core/secp256k1/issues/451
Merit: 263
Quote

You can configure libsecp256k1 not to use GMP at all. Option is --with-bignum=none.

pirate proxy TPB

Pages: [1] print


« previous topic next topic »
Bitcoin Forum > Bitcoin > Development & Technical Discussion > libsecp256k1 as a library/dll/etc

Jump to: => Development & Technical Discussion go

Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines

You might also like