【ffmpeg + VS2010】编译包含libavutil\common.h后出现找不到inttypes.h的问题
2013-04-15 20:13
113 查看
原文地址:http://blog.sina.com.cn/s/blog_48dc8a0001017p0u.html
包含libavutil\common.h,由于里面#include <inttypes.h> ,会出现找不到inttypes.h的问题,
即使把inttypes.h的路径加上去之后,也无法编译通过,反而会出现一大堆问题。
解决办法如下:
删除#include <inttypes.h>这句,加上下面一大段
//Howard 2013-03-04 , 解决包含inttypes.h以后出现的Bug
//#include <inttypes.h>
//Howard 2013-03-04 +++begin+++
#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
#define CONFIG_WIN32
#endif
#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(EMULATE_INTTYPES)
#define EMULATE_INTTYPES
#endif
#ifndef EMULATE_INTTYPES
#include <inttypes.h>
#else
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;
#ifdef CONFIG_WIN32
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else /* other OS */
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
#endif /* other OS */
#endif /* EMULATE_INTTYPES */
//解决UINT64_C没定义的问题
#ifndef INT64_C
#define INT64_C(c) (c##LL)
#define UINT64_C(c) (c##ULL)
#endif
包含libavutil\common.h,由于里面#include <inttypes.h> ,会出现找不到inttypes.h的问题,
即使把inttypes.h的路径加上去之后,也无法编译通过,反而会出现一大堆问题。
解决办法如下:
删除#include <inttypes.h>这句,加上下面一大段
//Howard 2013-03-04 , 解决包含inttypes.h以后出现的Bug
//#include <inttypes.h>
//Howard 2013-03-04 +++begin+++
#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
#define CONFIG_WIN32
#endif
#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(EMULATE_INTTYPES)
#define EMULATE_INTTYPES
#endif
#ifndef EMULATE_INTTYPES
#include <inttypes.h>
#else
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;
#ifdef CONFIG_WIN32
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else /* other OS */
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
#endif /* other OS */
#endif /* EMULATE_INTTYPES */
//解决UINT64_C没定义的问题
#ifndef INT64_C
#define INT64_C(c) (c##LL)
#define UINT64_C(c) (c##ULL)
#endif
相关文章推荐
- 【ffmpeg + VS2010】编译包含libavutil\common.h后出现找不到inttypes.h的问题
- 【ffmpeg + VS2010】编译包含libavutil\common.h后出现找不到inttypes.h的问题
- ndk编译 ffmpeg 1.1.1 出现libavutil/time.h 和系统的time.h 冲突问题 ;
- vc编译ffmpeg遇到问题(inttypes.h和UINT64_C问题)
- VS2010编译Qt5.3项目,出现Moc'ing xxx.h,系统找不到指定路径问题
- vs2008 下编译ffmpeg,找不到inttypes.h和stdint.h,将这两个源码贴上
- VS2008编译DirectX SDK 2004 summer版的Sound例子程序出现的libcp.lib找不到的问题的解决办法
- [C] 让VC支持C99的整数类型V1.01。避免包含目录问题,更名auto_stdint.h、auto_inttypes.h(在VC6至VC2012、GCC、BCB等编译器下测试通过)
- 解决Visual Studio编译出现Moc'ing文件,系统找不到指定路径问题
- CentOS6.x ffmpeg编译出现的问题
- FFmpeg编译出现问题
- 【图文】Ubuntu系统源码方式编译安装node.js以及express安装出现找不到命令的问题
- 解决Visual Studio编译出现Moc'ing文件,系统找不到指定路径问题
- ffmpeg库在windows下编译出现无法链接的问题的解决方法
- UCGUI Deom程序使用vs2010编译提示找不到libc.lib
- C语言编译出现give arg types警告问题
- ffmpeg遇到inttypes.h找不到
- 运行VS2013编译成功后出现:无法启动程序“.exe” 系统找不到指定文件的问题的解决方法
- ubuntu16.04下编译caffe出现.build_release/lib/libcaffe.so: undefined reference to google ::protobuf...的问题
- 关于opencv编译出现importerror:../../lib/libopencv_core.so cannot share or open问题