I’m trying to compile a set of Cpp Unit tests for an ARM based platform. In compiling with visual studio we are getting an error
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xkeycheck.h(250) : fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
I’d like to not have the MSVC include files get added to the options.txt -IC list. How do I make that happen? I’ve tried below. But to no avail.
Thanks for raising this issue. I belive this is a limitation with the current modeling for Visual Studio. You can raise an issue on github for future enhancement of the model.
A possible workaround would be to configure the VisualCpp toolchain to use an invalidwindowSdkDir path which would result in not finding any include although the sdk include path is added inside the options.txt file.
Thanks Daniel,
That doesn’t seem to work. In trying to set the windowsSdkDir i get an error saying that there is no valid SDK there and it doesn’t try to compile anything.
Unfortunately, this is less than ideal to fix but it is possible to fix. The VisualCpp implementation will try to locate the SDK according the the path you specified. The locator code will eventually make it’s way to the isWindowsSdk method. To validate the Windows SDK, Gradle tries to find rc.exe and kernel32.lib. Try to create the following files relative to the root you specified for windowsSdk property:
bin/rc.exe
lib/kernel32.lib
With those two file (can be simple empty text file) the check should succeed and will use this new, mostly empty, folder as the Windows SDK. It should pick up any files from it. Just be careful with the kernel32.lib file where you will most likely have to specify the real one if you need it.
I opened an issue for you to track this limitation.