VC下ffmpeg例程调试报错处理 分类: ffmpeg-SDL-VLC-Live555 2013-08-23 09:24 2466人阅读 评论(1) 收藏

tools/options/directories/include files  添加ffmpeg头文件所在路径

tools/options/directories/library files  添加ffmpeg库路径

project/settings/link/object/library modules 添加所用的ffmpeg库

二二

二、

、、

、报错解决

报错解决报错解决

报错解决

1、解决:Cannot open include file: 'inttypes.h'

更新ffmpeg之后,有时编译应用ffmpeg库的工程会发现提示: Cannot open

include file: 'inttypes.h': No such file or directory 的出错信息,可通过如下方法解

决:

    (1) 找到include目录中的ffmpeg\common.h

    (2)在“#define COMMON_H”之后加入如下代码,同时删除“#include

<inttypes.h>” 然后保存:

#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 */ 

保存后再编译

2、解决error C2054: expected '(' to follow 'inline' 

不用改代码,直接改project->[setting]->[c/c++]->Preprocessor definitions:编辑框里输入

inline=__inline即可 

3、解决error C2010: '.' : unexpected in macro formal parameter list

直接注释掉相应行 ,换版本

4

、解决

VC

不包含

stdint.h

头文件问题

 

     stdint.h是C99的标准,主要用于统一跨平台数据定义。MSVC中不带有这个头文件,

直到VS2010。在之前的版本里面,我们可以:

    (1)下载这个头文件

download a MS version of this header from:

    http://msinttypes.googlecode.com/svn/trunk/stdint.h

A portable one can be found here:

    http://www.azillionmonkeys.com/qed/pstdint.h

    (2)将头文件放到(以VS2008为例):

C:\Program Files\Microsoft Visual Studio 9.0\VC\include

 

 

版权声明:本文为博主原创文章,未经博主允许不得转载。

posted @ 2013-08-23 09:24  毛毛虫的薄刻  阅读(149)  评论(0编辑  收藏  举报