Answered by:
Standard files "stddef.h", "string.h" missing in Visual studio 2015 RC.

Question
-
Hi,
I am getting below errors while building source code with Visual studio 2015 RC:
fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
fatal error C1083: Cannot open include file: 'string.h': No such file or directory
fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
I have installed Visual studio 2015 on my local drive, and did not find the above header files under "F:\VS_2015\VC\include" installed path.
Can you please guide me from where do i need to include this files to my project?
Regards,
Amol Gaikwad.
Regards, Amol Gaikwad.
Friday, July 10, 2015 12:31 PM
Answers
-
I am getting below errors while building source code with Visual studio 2015 RC:
fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
fatal error C1083: Cannot open include file: 'string.h': No such file or directory
fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
I have installed Visual studio 2015 on my local drive, and did not find the above header files under "F:\VS_2015\VC\include" installed path.
Can you please guide me from where do i need to include this files to my project?
Introducing the Universal CRT
http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx
Excerpt from the above:
"The headers, sources, and libraries are now distributed as part of a separate
Universal CRT SDK. This SDK is included with Visual Studio; it is installed by
default to C:\Program Files (x86)\Windows Kits\10."
- Wayne
- Proposed as answer by Shu 2017 Thursday, July 16, 2015 9:22 AM
- Marked as answer by AMOLNGAIKWAD Thursday, July 16, 2015 9:51 AM
Friday, July 10, 2015 10:40 PM
All replies
-
>Can you please guide me from where do i need to include this files to my project?
Have a look at "C++ Standard Library Header Files":
https://msdn.microsoft.com/en-us/library/a7tkse1h.aspxGenerally... drop the .h extension.
Dave
Friday, July 10, 2015 8:08 PM -
Have a look at "C++ Standard Library Header Files":
https://msdn.microsoft.com/en-us/library/a7tkse1h.aspxGenerally... drop the .h extension.
Dave
I don't think that applies here.
>>fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
>>fatal error C1083: Cannot open include file: 'string.h': No such file or directory
>>fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
Those are headers from the C RTL, not C++.
C Run-Time Library Reference
https://msdn.microsoft.com/en-us/library/59ey50w6%28v=vs.140%29.aspx
If you drop the .h from <string.h> and use <string> you will get the C++ string class
header instead. The C++ replacement for <string.h> is <cstring>.
Also see:
Introducing the Universal CRT
http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx
- Wayne
Friday, July 10, 2015 10:32 PM -
I am getting below errors while building source code with Visual studio 2015 RC:
fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
fatal error C1083: Cannot open include file: 'string.h': No such file or directory
fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
I have installed Visual studio 2015 on my local drive, and did not find the above header files under "F:\VS_2015\VC\include" installed path.
Can you please guide me from where do i need to include this files to my project?
Introducing the Universal CRT
http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx
Excerpt from the above:
"The headers, sources, and libraries are now distributed as part of a separate
Universal CRT SDK. This SDK is included with Visual Studio; it is installed by
default to C:\Program Files (x86)\Windows Kits\10."
- Wayne
- Proposed as answer by Shu 2017 Thursday, July 16, 2015 9:22 AM
- Marked as answer by AMOLNGAIKWAD Thursday, July 16, 2015 9:51 AM
Friday, July 10, 2015 10:40 PM -
Thanks for helping me in resolving this issue.
Regards
Amol.
Regards, Amol Gaikwad.
Thursday, July 16, 2015 9:52 AM -
I installed vs2015 on my windows 7 professional.
I only find some blank dir on the path:
C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10
I searched on the web, I didn't find the right windows kits 10 installation file. And I am also not sure if the Windows Kits 10 go with windows 7.
Any help about Windows Kits 10?
Regards
-Bruce
Friday, August 7, 2015 8:29 AM -
I found that a clean 2015 installation was able to build a C/C++ project I had on a new machine ... until I installed VS2012 (which I needed for older projects). Then I started getting the same errors above.
NirdGirl
Wednesday, January 20, 2016 6:29 PM -
Could you please let me know what was the help?Monday, December 12, 2016 11:05 PM
-
Sorry for nercoposting, but for reference:
Modify/Change installation with adding Universal CRT SDK did the trick for me.
- Proposed as answer by Brot2 Friday, September 14, 2018 12:09 PM
Monday, May 15, 2017 9:59 AM -
I'm a little bit upset. How can the moderator declare this to be answered? The answer does not specify the directory. The answer does not specify how to find that directory. The answer just specified an alleged parent directory of the directory. On my machine the needed file is NOT available via this path.Thursday, July 20, 2017 7:20 PM
-
That is a non-answer. I cannot change the header files; I have to find something working with the original header files.
Thursday, July 20, 2017 7:22 PM -
Sorry I cannot change the programs using the standard headers. Above references all require a change.Thursday, July 20, 2017 7:23 PM
-
First of all, the original poster declared this to be an answer. The moderator only proposed it as an answer.
Secondly, the answer points to the Windows SDK directory, and historically they have always contained an include and lib directory to store the header files and libraries for Windows. It wouldn't be a surprise for those to end up there too.
The full path to the UCRT headers though is:
C:\Program Files (x86)\Windows Kits\10\Include\<version>\ucrt
where <version> is the version of the Windows 10 SDK that you have installed. Since I have the latest Windows 10 SDK installed, I have:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt
as the full path to them, If you are using the Windows 8.1 SDK option, then they are going to be in:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt
but for various reasons, I seriously suggest you keep the latest Windows 10 SDK installed for the UCRT.
If you have looked in these paths and you cannot find the files, then this is either the Windows 10 SDK install (or the UCRT SDK install) being corrupt, or if you have installed the Windows 10 SDK version 15063.0, then you installed the wrong components.
Oh, and if this in relation to Visual Studio 2017, then don't forget, if you don't install any of the SDKs then the UCRT won't be installed, so you must at least install one of the Windows 10 SDKs in that case.
This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
- Edited by Darran Rowe Thursday, July 20, 2017 8:31 PM
Thursday, July 20, 2017 8:29 PM -
Sorry for nercoposting, but for reference:
Modify/Change installation with adding Universal CRT SDK did the trick for me.
This worked for me! Many Thanks!!Friday, September 14, 2018 12:10 PM