visual-c++-6 - VC6 : fatal error C1083: Cannot open include file: 'stdint.h'

标签 visual-c++-6 stdint

在 VC6 中编译时,我收到错误:

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



谁能解释为什么我收到这个错误?

最佳答案

我有一个类似的问题:

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.
我找到了 this提到使用 VS 2017 命令提示符可以提供帮助的答案。我用的是 2008 年,所以我搜索了 2017 年。
有Visual Studio 2017的和我一样找不到命令提示符的,打开CMD运行:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"请注意,我有一个名为 Enterprise 的文件夹。 ,但您可能有一个不同的文件夹(可能是 Community 或其他)。
在那之后,我运行了它并且运行良好:
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
我还用这个命令创建了一个快捷方式:
C:\Windows\SysWOW64\cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"  
把它放在这里:
C:\Users\<myuser>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs  
归功于 this回答。

关于visual-c++-6 - VC6 : fatal error C1083: Cannot open include file: 'stdint.h' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20427614/

相关文章:

visual-c++ - 将 AfxGetMainWnd 上的 C 风格系列转换从 VC6/MFC6 转换为在现代 MFC 版本(VC++2008 及更高版本)中运行

c++ - 导入 VC++2005 时 CString 出错?

c++ - 如何在不终止主应用程序的情况下卸载 ActiveX 的 ocx 以允许覆盖 ocx?

c - 根据用户输入声明特定宽度变量的最佳方法

c++ - 位字段与 stdint 定义

c - 如何在 C 中移植打印 int64_t 类型

visual-studio - 从 Visual Studio 6 中删除 SourceSafe 集成

cuda - 在 CUDA NVRTC 代码中包含 C 标准头文件

c - 从 8 位值转换时如何对 9 位值进行符号扩展?