I’m trying to build c++ libraries on windows, gradle isn’t selecting the visual studio toolchain.
I’m running ./gradlew :hal:hALDesktopSahredLibrary
in git shell. Doesn’t work in Command Prompt either. Same error.
cl IS in the path!
the error message
:hal:addNiLibraryLinks
:hal:compileHALDesktopSharedLibraryHALDesktopCpp FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':hal:compileHALDesktopSharedLibraryHALDesktopCpp'.
> No tool chain is available to build for platform 'windows':
- Tool chain 'gcc' (GNU GCC): Could not find C compiler 'gcc' in system path.
- Tool chain 'macGcc' (Clang): Could not find C compiler 'clang' in system path.'
Why isn’t it asking about VisualCPP?
Here is the offending build.gradle
apply plugin: 'cpp'
model {
platforms {
arm {
architecture 'arm'
operatingSystem 'linux'
}
desktop {
architecture 'x86_64'
}
}
components {
HALDesktop(NativeLibrarySpec) {
targetPlatform 'windows'
sources {
cpp {
source {
srcDirs = ["lib/Desktop", "lib/Shared"]
includes = ["**/*.cpp"]
}
exportedHeaders {
srcDirs = ["include", "lib/Desktop", "lib/Shared"]
}
}
}
}
}
}