I'm having header-related issues apparently new to VS2015 while trying to compile DOSBox SVN Daum in Windows 10. Examples:
Severity Code Description Project File Line Suppression State
Error (active) the global scope has no "int_least8_t" dosbox c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint 23
Error C2039 'int_least8_t': is not a member of '`global namespace'' dosbox C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint 23
My search tells me this sort of problem has been happening to projects around, but I couldn't get it fixed.
In particular, I read VisualStudio 2015 RC Issue with Includes and https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/ , and then changed the contents of AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props to:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>D:\dev\include;$(UniversalCRT_IncludePath);$(IncludePath)</IncludePath>
<LibraryPath>D:\dev\lib;$(UniversalCRT_LibraryPath_x86);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
</Project>
No luck though. :(
Images:

I'm far from being an experienced C programmer. Can anyone please tell me what's missing? Thanks!
I had the same issue with a different program and after looking at the includes, I finally solved it.
If you look at a typical
cstdintfrom a recent Visual Studio, you'll notice one include isstdint.h. This is where the actual definitions for the various types exist. Whatcstdintdoes is export the definitions to be members of thestdnamespace.However, it appears here that while the first lines with
intXX_tcompiled fine, theint_least_xx_tdon't. This is because it reads the wrongstdint.hfile, that doesn't have some of the definitions needed. That file was written by people who wanted to use the named sizes before MSVC supported them (they came with C99, that MSVC never really got around to support, then in C++11, which at that point MSVC offered support for).As they only needed the exact types, they didn't write the defines for the other types. Now that MSVC supports it, there is no need for this compatibility file. However, because the projects files were not updated, the compiler will find the bad compatibility header instead of the correct one, which leads to this error.
There are two ways to solve this: change the include folder order so that it will get the one you want, or delete the bad
stdint.hfile. It is easy to find as you can use Visual Studio to open#includefiles. For your case, the file is in thesrc/platform/visualc/directory.Addendum: this is my faulty
stdint.hfile