Open vavavr00m opened 4 weeks ago
It may be a problem with the vcpkg installation, check ./vcpkg
installation directory to see if the gmp.h
file has been generated.
For example, does the file gmp.h exist in the following path?
./vcpkg/packages/mpir_x64-windows-static/include/gmp.h
./vcpkg/installed/x64-windows-static/include/gmp.h
./vcpkg/buildtrees/mpir/x64-windows-static/lib/x64/Release/gmp.h
Doesn't have the suffix -static
probably because I used the command vcpkg install mpir --triplet=x64-windows
instead of vcpkg install mpir:x64-windows-static
.
\vcpkg\packages\mpir_x64-windows\include\gmp.h
\vcpkg\installed\x64-windows\include\gmp.h
lib folder does not exist in \vcpkg\buildtrees\mpir\x64-windows\
, therefore, no gmp.h exist there
Is static necessary? Should I reinstall vcpkg or will the proj. be updated to handle such case?
I see line 21 of the log,
Using triplet "x64-windows-static" from "C:\Users\0\vcpkg\installed\x64-windows-static\"
The log shows that the project uses the x64-windows-static
path, while you have installed the dynamic library (x64-windows, .\vcpkg\vcpkg install mpir --triplet=x64-windows
). So, the root of the problem is the folder where the project is trying to use the static link library.
Static is not required, but the project is configured to use dynamic libraries correctly. That could be the problem, try that first.
Then you should also make sure Make sure the gmp.h
file exists under C:\Users\0\vcpkg\installed\x64-windows\include
.
Thank you. I used vcpkg install mpir:x64-windows-static
and gmp.h
is now in the first two directories. I'm getting an error because of a hardcoded path in line 92
of winrar-keygen.rc
. Manually changing it to icon.png
built the project and I can confirm the it worked perfectly for me.
One more thing, could you please outline the bare minimum components of the VS 2022 Build Tools required for this project to compile successfully? I downloaded over 2.3 GB solely for compiling. I'd prefer to have only what's necessary since it will be compiled on systems w/ limited space and/or poor connection.
Here's a copy of the Visual Studio Build Tools component catalogue, which, in addition to the necessary tools, requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64
.
Component ID | Name | Dependency type |
---|---|---|
Microsoft.Component.MSBuild | MSBuild | Required |
Microsoft.VisualStudio.Component.Roslyn.Compiler | C# and Visual Basic Roslyn compilers | Required |
Microsoft.VisualStudio.Component.TextTemplating | Text Template Transformation | Required |
Microsoft.VisualStudio.Component.VC.CoreBuildTools | C++ Build Tools core features | Required |
Microsoft.VisualStudio.Component.VC.CoreIde | C++ core features | Required |
Microsoft.VisualStudio.Component.VC.Redist.14.Latest | C++ 2022 Redistributable Update | Required |
Microsoft.VisualStudio.Component.Windows10SDK | Windows Universal C Runtime | Required |
Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core | C++ core desktop features | Required |
Microsoft.VisualStudio.Component.VC.Tools.x86.x64 | MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest) | Recommended |
OS: Windows 11 Pro
I cobbled up a batch script that generates the key automatically last year and it still works as of today, however, with the xz utils incident several months ago, I wanna be on the safe side and have the script eventually be able to build the KG from source automatically without installing the entire Visual Studio. I'm no developer, just casually learning how to write batch script; it's a bit of a struggle for me to figure it out.
Downloaded source zip and extracted to C:
Downloaded hMSBuild.bat and moved it to
C:\Windows
Installed VS2022 Build Tools along + some per this issue for it to stop throwing an error "vcpkg install error:in triplet x64-windows: Unable to find a valid Visual Studio instance Could not locate a complete Visual Studio instance"
Rebooted
Installed git
Installed vcpkg
Installed mpir
Not sure what this does but ran it anyway
Go to the extracted files
Ran:
Build fails. See log below. What am I doing wrong? How can I simplify the process and ensure that only the necessary stuff are installed?