Unable to run or build CUnit sample

I am attempting to build and run the CUnit sample in native-binaries/cunit, but I keep getting the same error:

I have tried changing the cunit.lib:

def findCUnitLibForPlatform(Platform platform) {
if (platform.operatingSystem.windows) {
return “vs2010/cunit.lib”
// return “vs2013/cunit.lib”
// return “cygwin/cunit.lib”
// return “mingw/cunit.lib”
} else if (platform.operatingSystem.macOsX) {
return “osx/libcunit.a”
} else {
return “linux/libcunit.a”

and even though I have VS 2010 sdk, I still get an error. Can anyone offer any advice?

Which version of Gradle are you using (gradle -version) and are you trying to build with cygwin?

Are you on a 64-bit OS? That looks like you may be trying to build 32-bit without the 32-bit libraries available.

Gradle version 2.12 and I’m on Windows 7, 64 bit OS.

I’ve tried to build through the windows CLI and through Cygwin, and I still had the same results.

I don’t have my Windows machine available to give you an exact path, but if you look in the Visual Studio install path (where cl.exe and the platform runtime libraries are), there should be directories for x86 and amd64. Depending on how you installed VS, you may have gotten only the 64-bit libraries and not the 32-bit ones.

If you take a look at build/tmp/linkOperatorsFailingSharedLibrary/options.txt, you should be able to find the library paths Gradle is searching and check that it exists.

Sterling thanks for getting back to me. When I look at my options.txt this is what I see:

"/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib"

so I don’t have a directory in C:\Lib\winv6.3\um\x86, so I can see why it can’t find the library. I did find this C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86 which includes kernel32.lib. I have Visual Studio 2012 express and Visual Studio 2015 express installed.
According to DefaultWindowsSdkLocator.java both Software and Software/Wow6432Node should be getting checked for the SDK that has this library.

Software/Wow6432Node/Microsoft SDKs/Windows/v8.1 - InstallationFolder has the correct path that if prepended to \Lib\winv6.3\um\x86 would take me to kernel32.lib, but the options.txt shows that we don’t check in that path.

I guess this is an issue with my Windows 7 setup, but I wanted to post my findings. I will post an update following up on my situation.