gpt4 book ai didi

c - stdint.h 和 inttypes.h 丢失

转载 作者:行者123 更新时间:2023-11-30 15:10:58 25 4
gpt4 key购买 nike

我正在寻找任何 GCC/MinGW 大师。我尝试使用 MinGW 在 Windows 8.1 中安装一个库,并配置说 stdint.h 和 inttypes.h 丢失:

$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... no
checking for stdint.h... no

这是我从 http://www.mingw.org/category/wiki/download 下载当前版本后的 MinGW 设置。 :

MINGWBASEDIR=C:\MinGW
gcc version 4.9.3 (GCC)
gcc version 4.8.1 (GCC)
GNU gdb (GDB) 7.6.1
GNU ld (GNU Binutils) 2.25.1
GNU windres (GNU Binutils) 2.25.1
GNU dlltool (GNU Binutils) 2.25.1
libtool (GNU libtool) 2.4
PExports 0.47; Originally written 1998, Anders Norlander
GNU Make 3.82.90
#define __MINGW32_VERSION 3.20
#define __W32API_VERSION 3.17

$ echo $MSYSTEM
MINGW32

$ locate stdint.h
reports nothing (updatedb is up to date)

如何将这些 header 放入我的框中?

最佳答案

我在尝试构建 libx264 时遇到了类似的问题。我找到了solution on the Msys wiki ,尽管没有明确指出它与这个问题有关。我的解决方案是将 C:/MinGW 安装在 Msys shell 内。 Msys shell 从 C:/MinGW/msys/1.0/msys.bat 启动,然后运行:

mount c:/MinGW /mingw
据我所知,这在构建时公开了 Msys 和 MinGW 包含目录。由于 stdint.h 和 inttypes.h 仅存在于 MinGW 包含中并且不能简单地复制,因此这是唯一的编译方法。之后libx264编译没有错误。希望此修复也能帮助您解决问题。

MinGW版本:mingw-get版本0.6.2-beta-20131004-1

关于c - stdint.h 和 inttypes.h 丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35884277/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com