I cross compiled on Ubuntu using
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/x86_64-w64-mingw32.toolchain.cmake
and compiled on Windows 10 using
0cmake -G "Visual Studio 17 2022" -A x64 -S . -B build
1cmake --build build --config RelWithDebInfo
In both cases compiled secp256k1 library causes the following error when I try to run Electrum wallet (https://github.com/spesmilo/electrum) on Windows 10
0File "D:\Data\repos\Python\electrum\electrum\ecc_fast.py", line 151, in <module>
1 raise ImportError("Failed to load libsecp256k1")
2ImportError: Failed to load libsecp256k1
3 0.84 | E | ecc_fast | failed to load libsecp256k1: LibModuleMissing('libsecp256k1 library found but it was built without required module (--enable-module-recovery)')
I don’t get this error when I compile this library on Ubuntu 22.04.2 LTS using Electrum build script, i.e. Electrum wallet runs without problems on Ubuntu using that compiled library.