2012-11-07 135 views
19

在使用Visual Studio 2010的Windows中構建ffMPEG時,遇到了inttypes.h not found錯誤。
由於通過互聯網搜索導致我錯誤的解決方案,我想我會在這裏提出正確的解決方案,以便人們可以輕鬆找到它。很快會回答我自己的問題。ffMPEG「inttypes.h not found」錯誤

回答

44

解決方法是下載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得到更換。

希望這有助於。

+0

作爲我在ffMPEG版本中的一個說明,我也在pixdesc.h中包含了一個include。另外,如果你只包含在包含目錄中的外部包含文件夾,它將是'#include「libavutil/inttypes.d」'代替。 – Chris

2
#ifndef HAS_INT_TYPES 

#ifdef HAS_C99 
    #include <stdint.h> 
#endif 

#endif 
相關問題