VC6: fatal error C1083: Cannot open include file: 'stdint.h'
Asked Answered
S

1

8

When compiling in VC6 I am receiving the error:

(fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory)

Can anyone explain why I am receiving this error?

Scroggins answered 6/12, 2013 at 15:26 Comment(3)
does int #include line say "stdint.h"? or <stdint.h>Argus
See #12970793 and #6689395Goodkin
Apparently Microsoft only supports C89, although I think VC6 was released in 1998, so it couldn't be expected to support C99 anyway. But even in their latest compilers, Microsoft doesn't support C99.Goodkin
E
3

I had a similar issue:

C:\Users\<myuser>\Desktop\Putty For Windows\windows>nmake -f Makefile.vc

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /Fo  /nologo /W3 /O1 -I..\./ -I..\charset/ -I..\windows/ -I..\unix/ /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500 /D_CRT_SECURE_NO_WARNINGS /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE /DHAS_GSSAPI  /c ..\marshal.c ..\utils.c
marshal.c
c:\users\<myuser>\desktop\putty for windows\defs.h(15) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
utils.c
c:\users\<myuser>\desktop\putty for windows\defs.h(15) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
Generating Code...
NMAKE : fatal error U1077: '"C:\Users\<myuser>\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.EXE"' : return code '0x2'
Stop.

I found this answer which mention that using VS 2017 Command prompt can help. I used 2008 so I searched for 2017.

For those who has Visual Studio 2017 and can't find the Command prompt like me, open CMD and run: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"

Notice that I had the folder named Enterprise, but you might have a different folder (maybe Community or something else).

After that, I ran it and it worked good:

C:\Users\<myuser>>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.27
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************

C:\Users\<myuser>>cd C:\Users\<myuser>\Desktop\Putty For Windows\windows

C:\Users\<myuser>\Desktop\Putty For Windows\windows>nmake -f Makefile.vc

I also created a shortcut with this command:

C:\Windows\SysWOW64\cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"  

Placed it here:

C:\Users\<myuser>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs  

Credit to this answer.

Elisavetgrad answered 13/4, 2021 at 13:51 Comment(1)
Doesn't answer why the header wasn't available in antique VC6. The answer is simply that the compiler is far too old.Edette

© 2022 - 2024 — McMap. All rights reserved.