microsoft / STL

MSVC's implementation of the C++ Standard Library.
Other
10.07k stars 1.48k forks source link

compile STL error: Problem #4680

Closed ChenMiaoi closed 4 months ago

ChenMiaoi commented 4 months ago

Describe the bug

I tried to compile the STL on windows11, but there was an error with incorrect SDK version information.But I do know that my environment should be complete and configured according to the compilation dependency requirements on the README.

image

Expected behavior

I don't know if there is a problem with my SDK PATH, but I can confirm that my SDK version is displayed correctly on cmd.

STL version

SDK version

image

image

AlexGuteniev commented 4 months ago

After installing newer SDK I had to restart Windows to make CMake pick it up, maybe environment does not propagate somewhere

ChenMiaoi commented 4 months ago

maybe, but I restart some times, not work well, it's the same result, btw, my cmake version is 3.29.3

cpplearner commented 4 months ago

can you run set INCLUDE and set WindowsSdkDir and paste the output here?

ChenMiaoi commented 4 months ago

can you run set INCLUDE and set WindowsSdkDir and paste the output here?

image this is SDK image this is include

cpplearner commented 4 months ago

Hmm, the SDK dir seems fine. The content of INCLUDE is truncated so I can't see whether it contains the SDK dir. (It should contain D:\Windows Kits\10\include\10.0.22621.0\ucrt;D:\Windows Kits\10\\include\10.0.22621.0\\um;D:\Windows Kits\10\\include\10.0.22621.0\\shared, among others.)

ChenMiaoi commented 4 months ago

Hmm, the SDK dir seems fine. The content of INCLUDE is truncated so I can't see whether it contains the SDK dir. (It should contain D:\Windows Kits\10\include\10.0.22621.0\ucrt;D:\Windows Kits\10\\include\10.0.22621.0\\um;D:\Windows Kits\10\\include\10.0.22621.0\\shared, among others.)

INCLUDE=D:\Study\VS\VS\VC\Tools\MSVC\14.39.33519\include;D:\Study\VS\VS\VC\Tools\MSVC\14.39.33519\ATLMFC\include;D:\Study\VS\VS\VC\Auxiliary\VS\include;D:\Windows Kits\10\include\10.0.22621.0\ucrt;D:\Windows Kits\10\\include\10.0.22621.0\\um;D:\Windows Kits\10\\include\10.0.22621.0\\shared;D:\Windows Kits\10\\include\10.0.22621.0\\winrt;D:\Windows Kits\10\\include\10.0.22621.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um

I think the version is the same, 10.0.22621.0, should there be no impact on the sdk?

AlexGuteniev commented 4 months ago

Might be something cached. Try deleting generated files, /out dir and others if any

ChenMiaoi commented 4 months ago

Might be something cached. Try deleting generated files, /out dir and others if any

Ok, I tried, and done, thanks