【问题标题】:ffMPEG "inttypes.h not found" errorffMPEG“未找到inttypes.h”错误
【发布时间】:2012-10-27 08:10:35
【问题描述】:

在带有 Visual Studio 2010 的 Windows 中使用 ffMPEG 构建时,我遇到了 inttypes.h not found 错误。
由于通过互联网搜索导致我找到错误的解决方案,我想我会在这里提出正确的解决方案,以便人们可以轻松找到它。很快就会回答我自己的问题。

【问题讨论】:

    标签: visual-studio-2010 visual-c++ ffmpeg


    【解决方案1】:

    解决方案是下载this file 并将inttypes.h 文件放在Visual Studio 可以找到它的地方,或者放在ffMPEG 的common.h 所在的文件夹中。如果选择后者,则必须将 #include<inttypes.h> 行更改为 #include "inttypes.h"
    here 得到了这个解决方案。

    另一个对我不起作用的解决方案是将 #include<inttypes.h> 替换为

    typedef signed char  int8_t;
    typedef signed short int16_t;
    typedef signed int   int32_t;
    typedef unsigned char  uint8_t;
    typedef unsigned short uint16_t;
    typedef unsigned int   uint32_t;
    typedef signed long long   int64_t;
    typedef unsigned long long uint64_t;
    

    此解决方案来自here

    希望这会有所帮助。

    【讨论】:

    • 作为我的 ffMPEG 版本中的一个注释,我在 pixdesc.h 中也包含了这个。此外,如果您只有在包含目录中列出的外部包含文件夹,它将改为 #include "libavutil/inttypes.d"
    【解决方案2】:
    #ifndef HAS_INT_TYPES
    
    #ifdef HAS_C99
      #include <stdint.h>
    #endif
    
    #endif
    

    【讨论】:

      猜你喜欢
      • 2019-01-08
      • 2019-11-22
      • 2018-07-16
      • 1970-01-01
      • 1970-01-01
      • 2020-09-24
      • 2017-12-26
      • 2021-05-09
      • 2021-03-12
      相关资源
      最近更新 更多