2

I am stumping my head on this. I am trying to build libconfig on Windows - an OS that I am very unfamiliary with. I have installed the MSBuild Tools. I am able to compile CMake projects by using the NMake Generator and then compiling the resulting Makefile. libconfig has a .libconfig_vs2017.sln, which seems to be a "solution" file for the version of MSBuild I have installed.

Before compiling I have ran "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build/vcvars64.bat" because otherwise none of the necessary tools appear to be in the path.

No matter which combination I try, I always keep getting an error that the specified solution configuration is invalid. I have tried the following options:

msbuild libconfig_vs2017.sln
msbuild libconfig_vs2017.sln /p:Configuration=Debug /p:Platform="Any CPU"
msbuild libconfig_vs2017.sln /p:Configuration=Release /p:Platform="Any CPU"
msbuild libconfig_vs2017.sln /p:Configuration=Debug /p:Platform="x64"
msbuild libconfig_vs2017.sln /p:Configuration=Release /p:Platform="x64"
msbuild libconfig_vs2017.sln /p:Configuration=Debug /p:Platform="x86"
msbuild libconfig_vs2017.sln /p:Configuration=Release /p:Platform="x86"

What am I missing here to get this thing to compile on Windows? I am considering installing autotools but given that there is a supposedly ready to use solution file that seems overkill (and is probably difficult on Windows in its own right).

Martijn Otto
  • 878
  • 4
  • 21
  • 2
    I don't know what "libconfig_vs2017.sln" looks like, but you could open it with a text editor and check which configuration/platform options are actually available. One "platform" that's often used and not on your list is "Win32". – Mikkel K. Jul 19 '18 at 14:12
  • I do see all manner of Release|Win32 and Debug|Win32 entries in the sln file. Does this mean it will always build 32-bit? How can I specify the target in this case? – Martijn Otto Jul 19 '18 at 14:16
  • 2
    Have you tried Platform="Win32"? – Mikkel K. Jul 19 '18 at 14:17
  • Using Win32 as platform changes the error to something about being unable to find the right Windows SDK version. It seems it is looking for 10.0.16299.0 and I have 10.0.17134.0. – Martijn Otto Jul 19 '18 at 14:30

0 Answers0