-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Build] Compiler error when building ONNXRuntime: undeclared identifier STRSAFE_PCNZCH #22158
Comments
@marovira you say "In Windows 11 Pro, I am able to compile with any of the aforementioned prompts." |
Just to clarify:
I will send the |
Please send it from x64 Native Tools Command Prompt for VS 2022. |
Here's the output for
|
@satyajandhyala did you get a chance to see the output? |
Any updates on this issue? |
I think it might to relevant to the Windows SDK version you are using. The log you posted has the following information:
Could you please compare it in the two different builds, the passed one and the failed one, to see if there is any difference. I suggest using the newest Windows SDK. |
I have verified it, and it is indeed a problem caused by the Windows SDK version. It appears that the version of WIL used by ONNXRuntime is incompatible with older versions of the Windows SDK. As a side note, I searched through the official documentation from ONNXRuntime regarding this and I couldn't find any mentions of a minimum Windows SDK version. Perhaps it would be worth adding it? |
We recommend using the most recent Windows SDK. I am not sure what the minimum version that works. Sorry I did not test it that much. |
That's fair. Thanks for the help! |
Describe the issue
When building ONNXRuntime, I get a series of compiler errors saying that
STRSAFE_PCNZCH
, andSTRSAFE_LPSTR
are not defined. The issue is reproducible in Windows 11 Enterprise, though I am unable to reproduce it in Windows 11 Pro.The compiler error appears in Windows 11 Enterprise regardless of the environment in which it is launched. I can reliably reproduce it in any of the following:
In Windows 11 Pro, I am able to compile with any of the aforementioned prompts.
Note 1: I'm unsure if this is specific to Windows 11 Enterprise, but that is the only OS where I can reproduce this consistently.
Note 2: The build script below is using the latest version of ONNXRuntime (1.19.2) but I can reproduce this as far back as 1.16.3, so the issue is not new.
Urgency
This is blocking me from completing an automated build system necessary for CI scripts.
Target platform
Windows 11 Enterprise
Build script
Error / output
Relevant output:
Full output is available here
Visual Studio Version
Visual Studio Enterprise 2022 17.11.4
GCC / Compiler Version
No response
The text was updated successfully, but these errors were encountered: