简体   繁体   English

stdint.h和inttypes.h丢失

[英]stdint.h and inttypes.h missing

I am calling for any GCC/MinGW master out there. 我正在呼吁任何GCC / MinGW主管。 I try to install a library in Windows 8.1 using MinGW, and configure says stdint.h and inttypes.h are missing : 我尝试使用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

This is my MinGW setup after downloading the current version from http://www.mingw.org/category/wiki/download : 这是从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)

How I can get those headers in my box? 我怎样才能在框中找到这些标题?

I just ran into a similar problem when trying to build libx264. 尝试构建libx264时,我遇到了类似的问题。 I found the solution on the Msys wiki , though it was not explicitly stated that it was tied to this problem. 我没有在Msys Wiki上找到解决方案 ,尽管没有明确指出它与该问题有关。 The solution for me was to mount C:/MinGW inside of the Msys shell. 对我来说,解决方案是将C:/ MinGW装入Msys Shell中。 The Msys shell being started from C:/MinGW/msys/1.0/msys.bat, then running: 从C:/MinGW/msys/1.0/msys.bat启动Msys Shell,然后运行:

mount c:/MinGW /mingw

As best I can tell, this exposes both the Msys and MinGW include directories when building. 据我所知,构建时会同时公开Msys和MinGW的include目录。 Since stdint.h and inttypes.h were only present in the MinGW include and could not be simply copied over, this was the only way to compile. 由于stdint.h和inttypes.h仅存在于MinGW中,并且不能简单地复制过来,因此这是唯一的编译方法。 Afterwards, libx264 compiled without error. 之后,libx264编译没有错误。 Hope this fix will also help you with your issue. 希望此修复程序也可以帮助您解决问题。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM