<p>Problem resolved ! 
There was an error during the secp256k1 compilation process (MINGW32 under windows), adding:</p>

<blockquote>
  <p><code>LT_INIT([win32-dll])</code></p>
</blockquote>

<p>into the secp256k1/configure.ac has resolved the compilation error.</p>

CC BY-SA 3.0
2018-03-20T18:39:14.840Z
2018-03-20T18:39:14.840Z
Boody
<p>I have followed the guide "<a href="https://bitcointalk.org/index.php?topic=149479.0" rel="nofollow noreferrer">Building headless Bitcoin and Bitcoin-qt on Windows</a>" but with a more recent altcoin source code to test.</p>

<p>The compilation stop on <strong>ld.exe: cannot find -lsecp256k1</strong></p>

<p>Is one step missing to generate this missing dll ?</p>

<p>My qt-pro includes:</p>

<blockquote>
  <p>win32:BOOST_LIB_SUFFIX=-mgw49-mt-s-1_57<br>
  win32:BOOST_INCLUDE_PATH=C:/Deps/boost_1_57_0<br>
  win32:BOOST_LIB_PATH=C:/Deps/boost_1_57_0/stage/lib<br>
  win32:BDB_INCLUDE_PATH=c:/deps/db-4.8.30.NC/build_unix/<br>
  win32:BDB_LIB_PATH=c:/deps/db-4.8.30.NC/build_unix<br>
  win32:OPENSSL_INCLUDE_PATH=C:/Deps/openssl-1.0.2k/include/<br>
  win32:OPENSSL_LIB_PATH=C:/Deps/openssl-1.0.2k<br>
  win32:MINIUPNPC_INCLUDE_PATH=C:/Deps/<br>
  win32:MINIUPNPC_LIB_PATH=C:/Deps/miniupnpc/<br>
  win32:LIBPNG_INCLUDE_PATH=C:/Deps/libpng-1.6.1/<br>
  win32:LIBPNG_LIB_PATH=C:/Deps/libpng-1.6.18<br>
  win32:QRENCODE_INCLUDE_PATH=C:/Deps/qrencode-3.4.4<br>
  win32:QRENCODE_LIB_PATH=C:/Deps/qrencode-3.4.4/.libs<br>
  win32:SECP256K1_LIB_PATH = C:/Crypto/mycrypto/src/secp256k1/<br>
  win32:SECP256K1_INCLUDE_PATH = C:/Crypto/mycrypto/src/secp256k1/include</p>
</blockquote>

CC BY-SA 3.0
2018-03-13T11:37:25.857Z
Welcome to Bitcoin.SE! That is a fairly old guide for Bitcoin Core v0.9.4, v0.10rc4 or, v0.8.6. Usually, these days compiling Bitcoin Core for Windows is done in an Ubuntu environment or similar ([build-windows.md](https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md)) but, without a link to the altcoin source repository, I cannot even check what its build documents say. Probably it uses lsecp256k1 instead of or as well as secp256k1.
Willtech
CC BY-SA 3.0
2018-03-14T08:14:30.227Z
@Willtech thanks for your welcome. I have created two learning coins (the last one is https://github.com/JustCuriously/locavore) just to see how it work, build an explorer etc... it's of course copy of other old fork but it's to understand the process. The linux qt has been compiled but I'm not able to compile the Windows qt. If a use the new method (build-windows.md) on the old code I will have many depends errors now ?
Boody
CC BY-SA 3.0
2018-03-14T08:20:56.550Z
Your standard build instructions are [here](https://github.com/JustCuriously/locavore/blob/master/doc/build-msw.md), do they work?
Willtech
CC BY-SA 3.0
2018-03-14T17:15:47.773Z
more or less since I have not been able to compile the Windows version, I have not yet updated the method. I just commit the qt version for linux (with qt5). I'm looking for a complete version of code to study, with MN, POW, POS ... but every time I clone the git source and try to compile something is missing .. it seems that dev have something to hide or don't  like to share secret :-)
Boody
CC BY-SA 3.0
2018-03-14T20:46:50.323Z
Just out of interest, what happens if addthe two paths for lsecp256k1 just pointing them to secp256k1?
Willtech
CC BY-SA 3.0
2018-03-16T15:04:45.253Z
I restart from scratch my install and check my deps... no I have another error :build\key.o:key.cpp:(.text+0x8f3): undefined reference to `secp256k1_ecdsa_sign_recoverable'
./build\key.o:key.cpp:(.text+0x919): undefined reference to `secp256k1_ecdsa_recoverable_signature_serialize_compact'
./build\key.o:key.cpp:(.text+0x98a): undefined reference to `secp256k1_ecdsa_recoverable_signature_serialize_compact'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: ./build\key.o: bad reloc address 0x1c in section `.text$
Boody
CC BY-SA 3.0
2018-03-16T20:21:43.203Z
Do you still have the path for secp256k1 defined also?
Willtech
CC BY-SA 3.0
2018-03-16T21:11:37.087Z
yes, still defined so, I just remove everything (i'm working on a VM) to avoid duplicate install or different version.
Boody
CC BY-SA 3.0
2018-03-17T00:40:04.267Z
You can reset your git repository with `git clean -fdx` before trying to build if that saves some effort, but that is unrelated to your issue
Willtech
<wallet><altcoin><bitcoin-qt-setup>
Compiling bitcoin-qt error: ld.exe: cannot find -lsecp256k1
Boody
# Compiling bitcoin-qt error: ld.exe: cannot find -lsecp256k1

(Asked by: username_0 on 2018-03-13)

I have followed the guide "[Building headless Bitcoin and Bitcoin-qt on Windows](https://bitcointalk.org/index.php?topic=149479.0)" but with a more recent altcoin source code to test.

The compilation stop on **ld.exe: cannot find -lsecp256k1**

Is one step missing to generate this missing dll ?

My qt-pro includes:

> win32:BOOST\_LIB\_SUFFIX=-mgw49-mt-s-1\_57  
> win32:BOOST\_INCLUDE\_PATH=C:/Deps/boost\_1\_57\_0  
> win32:BOOST\_LIB\_PATH=C:/Deps/boost\_1\_57\_0/stage/lib  
> win32:BDB\_INCLUDE\_PATH=c:/deps/db-4.8.30.NC/build\_unix/  
> win32:BDB\_LIB\_PATH=c:/deps/db-4.8.30.NC/build\_unix  
> win32:OPENSSL\_INCLUDE\_PATH=C:/Deps/openssl-1.0.2k/include/  
> win32:OPENSSL\_LIB\_PATH=C:/Deps/openssl-1.0.2k  
> win32:MINIUPNPC\_INCLUDE\_PATH=C:/Deps/  
> win32:MINIUPNPC\_LIB\_PATH=C:/Deps/miniupnpc/  
> win32:LIBPNG\_INCLUDE\_PATH=C:/Deps/libpng-1.6.1/  
> win32:LIBPNG\_LIB\_PATH=C:/Deps/libpng-1.6.18  
> win32:QRENCODE\_INCLUDE\_PATH=C:/Deps/qrencode-3.4.4  
> win32:QRENCODE\_LIB\_PATH=C:/Deps/qrencode-3.4.4/.libs  
> win32:SECP256K1\_LIB\_PATH = C:/Crypto/mycrypto/src/secp256k1/  
> win32:SECP256K1\_INCLUDE\_PATH = C:/Crypto/mycrypto/src/secp256k1/include

**Tags:** wallet, altcoin, bitcoin-qt-setup

> **Comments:**
> **username_1**: Welcome to Bitcoin.SE! That is a fairly old guide for Bitcoin Core v0.9.4, v0.10rc4 or, v0.8.6. Usually, these days compiling Bitcoin Core for Windows is done in an Ubuntu environment or similar ([build-windows.md](https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md)) but, without a link to the altcoin source repository, I cannot even check what its build documents say. Probably it uses lsecp256k1 instead of or as well as secp256k1.  
> **username_0**: @username_1 thanks for your welcome. I have created two learning coins (the last one is https://github.com/JustCuriously/locavore) just to see how it work, build an explorer etc... it's of course copy of other old fork but it's to understand the process. The linux qt has been compiled but I'm not able to compile the Windows qt. If a use the new method (build-windows.md) on the old code I will have many depends errors now ?  
> **username_1**: Your standard build instructions are [here](https://github.com/JustCuriously/locavore/blob/master/doc/build-msw.md), do they work?  
> **username_0**: more or less since I have not been able to compile the Windows version, I have not yet updated the method. I just commit the qt version for linux (with qt5). I'm looking for a complete version of code to study, with MN, POW, POS ... but every time I clone the git source and try to compile something is missing .. it seems that dev have something to hide or don't  like to share secret :-)  
> **username_1**: Just out of interest, what happens if addthe two paths for lsecp256k1 just pointing them to secp256k1?  
> **username_0**: I restart from scratch my install and check my deps... no I have another error :build\key.o:key.cpp:(.text+0x8f3): undefined reference to `secp256k1_ecdsa_sign_recoverable' ./build\key.o:key.cpp:(.text+0x919): undefined reference to `secp256k1_ecdsa_recoverable_signature_serialize_compact' ./build\key.o:key.cpp:(.text+0x98a): undefined reference to `secp256k1_ecdsa_recoverable_signature_serialize_compact' C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: ./build\key.o: bad reloc address 0x1c in section `.text$  
> **username_1**: Do you still have the path for secp256k1 defined also?  
> **username_0**: yes, still defined so, I just remove everything (i'm working on a VM) to avoid duplicate install or different version.  
> **username_1**: You can reset your git repository with `git clean -fdx` before trying to build if that saves some effort, but that is unrelated to your issue  

---

## 1 answers

### Answer by username_0 on 2018-03-20. Score: 1

Problem resolved !
There was an error during the secp256k1 compilation process (MINGW32 under windows), adding:

> `LT_INIT([win32-dll])`

into the secp256k1/configure.ac has resolved the compilation error.


---

