The Windows SDK is not found on Windows 8.1
Reported by Simon MARCHETTO
BUG DESCRIPTION:
----------------
Codes or toolboxes using the Windows SDK API do not compile (with ilib_build, or other dynamic link command...) on Windows 8.1.
ERROR LOG:
----------
ilib_build returns the following error:
fatal error: "windows.h": no such file or directory
HOW TO REPRODUCE THE BUG:
-------------------------
Run the following code in Scilab:
source = [
'#define __USE_DEPRECATED_STACK_FUNCTIONS__'
'#include ""windows.h""'
'#include ""stack-c.h""'
'int sci_getWindowsDirectory(char *fname) {'
' char *pstOut;'
' char cBuf[MAX_PATH];'
' int m, n;'
' CheckRhs(0, 0);'
' CheckLhs(0, 1);'
' GetWindowsDirectoryA(cBuf, MAX_PATH);'
' m = (int) strlen(cBuf);'
' n = 1;'
' pstOut = (char*) &cBuf[0];'
' CreateVarFromPtr(Rhs+1, STRING_DATATYPE, &m, &n, &pstOut);'
' LhsVar(1) = Rhs+1;'
' return 0;'
'}'
];
test_dir = fullfile(TMPDIR, 'ilib_build_win_sdk');
mkdir(test_dir);
mputl(source, fullfile(test_dir, 'ilib_build_win_sdk.c'));
orig_path = pwd();
chdir(test_dir);
ilib_verbose(0);
ilib_build('test_c_lib', ['getWindowsDirectory', 'sci_getWindowsDirectory'], ['ilib_build_win_sdk.c'], []);
OTHER INFORMATION:
------------------