I have installed Visual Studio Community 2015 RC in it’s default location. Gradle seems to pick up the location through the registry [1], but the compilation fails because standard headers (e.g. stdio.h) are not found.
it works fine. The INCLUDEs seem to be not detected properly for automatic detection.
I’m using the latest stable release of Gradle (2.4).
[1] ([DEBUG] [org.gradle.nativeplatform.toolchain.internal.msvcpp.DefaultVisualStudioLocator] Found Visual C++ 14.0 at C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC)
I tried it again on a clean example (the native-binaries/c sample from the gradle distribution) and found that manually specifying the installDir for VS 2015 doesn’t solve the problem. I must have messed up the paths in my first attempt.
Anyway, VS 2015 support is broken. Some headers (e.g. stdio.h) are no longer present in ${installDir}/include. They have moved to directory C:/Program Files (x86)/Windows Kits/10/Include/10.0.10056.0/ucrt/, which is not picked up by gradle.
Is there an idea of when we can expect PR 704 to be merged and GRADLE-3313 to be resolved?
As far as I understand it, Microsoft introduced the breaking UCRT changes in March 2015, and they’ve already announced breaking changes for the next version - Compiler Tools Layout in Visual Studio “15”, should we expect a similar delay in support for that too?
We’re working around the UCRT issues at the moment while using VS2015 (short of building from source with the mentioned PR), but I’m concerned that the changes in the next version won’t be as easy to work around.
There is already a PR solving this issue on Windows with VS2015: #704:https://github.com/gradle/gradle/pull/704
except it seems to break the Linux build with gcc… I am wokring on this now
The issue tha was breaking gcc compiling on Linux has been fixed and the fixes are commited on the PR#704… You can apply this PR locally in case of urgency waiting for the definitive solution from @Daniel_L