I have searched for dozen of hours already (probably, 10+), but couldn't find a solution to my problem anywhere. I will list all the things I have tried and the issues I have encountered with them.
This is the library that I am trying to build using maven https://github.com/runtimeverification/mpfr-java The included README lists the instructions needed to compile for my platform, such as, simply, mvn install
It seems to me that hawtjni-maven-plugin:1.18 uses for building vcbuild.exe which was included with Visual Studio 2008. Important thing to note is that I am using amd x64 system.
- This is the latest (3rd) error I am getting after downloading vcbuild.exe for x64 exclusively and adding it to the system PATH.
Maven output:
[INFO] --- hawtjni-maven-plugin:1.18:generate (default) @ mpfr_java ---
[INFO] Analyzing classes...
[INFO] Generating...
[INFO] Done.
[INFO]
[INFO] --- hawtjni-maven-plugin:1.18:build (default) @ mpfr_java ---
[INFO] executing: cmd.exe /X /C "vcbuild /platform:x64 vs2008.vcproj release"
[INFO] rc: -1073741515
vcbuild failed with exit code: -1073741515
The first one that I encountered was
'VCBuild.exe' is not recognized as an internal or external command, operable program or batch file.
Which was obviously because the standard windows builds are now using MSBuild.exe And vcbuild is deprecated.
The second one was something like
"could not locate vcbuild for x64 system"
When I initially encountered this problem (2) I thought of just downloading the C++ Visual Studio 2008, but when I tried to download it from the Microsoft official website, I was asked if I'd like to save 6MB powerpoint presentation. So this didn't work. So I tried searching online for VS 2008 which had vcbuild included in it. And I found it! So now my system could understand "vcbuild" command. But however I tried, the installation lacked amd64 and "x64" folders, there was only the x32 version. Which led to the (3).
And the final attempt (1) was with the vcbuild.exe I found somewhere online.
So in all aforementioned cases I could not build my project.
Which leaves me with 4 options that I am aware of:
- Find the exact copy of VS 2008 with vcbuild for x64.
- Somehow manage to find the correct vcbuild.exe for x64 exclusively.
- Tweak maven plugin hawtjni to use MSBuild instead of VCBuild (I do not know how to do that)
- Follow the instructions in the README regarding "Building a JNI library which statically links against MPFR and GMP" Which I am not sure will not produce the same error because of vcbuild.
What should I do to resolve this problem?