windows build question

50 views
Skip to first unread message

acer

unread,
Jan 21, 2021, 12:43:19 PM1/21/21
to Ledger
I'm attempting to do a windows build using https://github.com/FullofQuarks/Windows-Ledger-Binaries.
It has worked great until I ran the build statement "msbuild..." in the powershell script.  The build failed referencing not being able to find gmp.h in line 131 of system.hh. The error message put out by msbuild is:
my\path\to\ledger\system.hh (131,10): fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory [my\path\to\ledger\src\ledger.vcxproj]

Can someone point me in the right direction to make this work? Btw i'm on windows10 32 bit

acer

unread,
Jan 21, 2021, 8:18:52 PM1/21/21
to Ledger
I figured it out.  I wasn't specific enough before, the msbuild statement that it failed on was building ledger.vcxproj. The mpir\msvc\vs19\msbuild.bat couldn't find MSBuild.exe.  For anyone wanting to do this on Windows 10 with VisualStudio 2019 or 2017 change lines 15-19 in msbuild.bat to:

set vsw_exe="%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"

for /f "usebackq tokens=1* delims=: " %%i in (`%vsw_exe% -latest -requires Microsoft.Component.MSBuild`) do (
     if /i "%%i"=="installationPath" set InstallDir=%%j)

This works on these versions of VS.  Anything before that will require something different to locate msbuild as vswhere, according to microsoft, didn't exisit before then.

With these changes this should be hands down the easiest Ledger build on Windows.  I didn't try Chocolatey but I'm not sure how that could make this easier.
Reply all
Reply to author
Forward
0 new messages