windows下Qt调用ffmpeg库编译问题
2014-07-28 19:53
288 查看
1、*\FFmpeg.h:12: error: libavcodec/avcodec.h: No such file or directory
下载安装ffmpeg库。
2、E:\BRT-Project\BRT-Windows\windows-demos\qtRtspClient\RTSPClient\include\libavutil\common.h:30: error: #error missing -D__STDC_CONSTANT_MACROS /
#define __STDC_CONSTANT_MACROS
extern "C"{
#ifdef __cplusplus
#define __STDC_CONSTANT_MACROS
#ifdef _STDINT_H
#undef _STDINT_H
#endif
# include <stdint.h>
#endif
}
3、*\include\libavutil\common.h:183: error: 'UINT64_C' was not declared in this scope
ffmpeg 是使用C语言写的,默认使用C编译,如果要在C++中调用ffmpeg,则有可能出现错误:
ffmpeg: 'UINT64_C' was not declared in this scope
解决办法三种:
一种是:
extern "C"{
#ifdef __cplusplus
#define __STDC_CONSTANT_MACROS
#ifdef _STDINT_H
#undef _STDINT_H
#endif
# include <stdint.h>
#endif
}
第二种是在ffmpeg的common.h文件中添加语句:
/usr/local/include/libavutil/common.h中添加:
#ifndef UINT64_C
#define UINT64_C(value)__CONCAT(value,ULL)
#endif
http://code.google.com/p/ffmpegsource/issues/detail?id=11
第三种:
在该头文件加以下语句就行了。
#ifndef INT64_C
#define INT64_C
#define UINT64_C
#endif
这个要放在
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavutil/avutil.h>
}
来源:http://blog.csdn.net/kidleaf2/article/details/7733284
下载安装ffmpeg库。
2、E:\BRT-Project\BRT-Windows\windows-demos\qtRtspClient\RTSPClient\include\libavutil\common.h:30: error: #error missing -D__STDC_CONSTANT_MACROS /
#define __STDC_CONSTANT_MACROS
extern "C"{
#ifdef __cplusplus
#define __STDC_CONSTANT_MACROS
#ifdef _STDINT_H
#undef _STDINT_H
#endif
# include <stdint.h>
#endif
}
3、*\include\libavutil\common.h:183: error: 'UINT64_C' was not declared in this scope
ffmpeg 是使用C语言写的,默认使用C编译,如果要在C++中调用ffmpeg,则有可能出现错误:
ffmpeg: 'UINT64_C' was not declared in this scope
解决办法三种:
一种是:
extern "C"{
#ifdef __cplusplus
#define __STDC_CONSTANT_MACROS
#ifdef _STDINT_H
#undef _STDINT_H
#endif
# include <stdint.h>
#endif
}
第二种是在ffmpeg的common.h文件中添加语句:
/usr/local/include/libavutil/common.h中添加:
#ifndef UINT64_C
#define UINT64_C(value)__CONCAT(value,ULL)
#endif
http://code.google.com/p/ffmpegsource/issues/detail?id=11
第三种:
在该头文件加以下语句就行了。
#ifndef INT64_C
#define INT64_C
#define UINT64_C
#endif
这个要放在
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavutil/avutil.h>
}
来源:http://blog.csdn.net/kidleaf2/article/details/7733284
相关文章推荐
- 在用VS和Intel C++ Complier编译下面两个移植到Windows下的FFmpeg时遇到的问题
- ffmpeg库在windows下编译出现无法链接的问题的解决方法
- EasyPlayerPro(Windows)开发系列之解决ffmpeg接口调用卡住的问题
- qt在windows下编译好的QT程序在其他没有安装QT的机器上会出现图标和图片无法正常显示的问题。
- windows下Qt编译遇到的问题
- 关于Mac下编译ffmpeg静态库供framework或者dylib调用出现illegal text-relocoation代码重定向问题
- 在windows下的qt5.7.1 的纯C或C++项目命令行中文乱码、无法编译等问题解决
- 学徒浅析Android开发——windows64下FFmpeg编译问题汇总
- qt在windows下编译遇到的一些问题
- Qt中使用SDL和FFmpeg的编译问题
- windows下qt编译ffmpeg
- Windows下编译好的Qt程序运行问题
- Windows下QT中用C++调用Python之二 - 编译BUG处理
- golang直接调用ffmpeg预编译类库(windows)已更新
- windows操作系统下:QT编译mysql驱动文件问题总结
- Qt在Windows下编译时 configure 问题一则
- quick-cocos2d-x Qt版本在windows上遇到的编译问题 LNK2001 !
- cmake3.8X64编译opencv3.2出现opencv_ffmpeg、opencv_ffmpeg_64、ippicv_windows_20151201.zip无法下载问题解决方案
- cmake3.8X64编译opencv3.2出现opencv_ffmpeg、opencv_ffmpeg_64、ippicv_windows_20151201.zip无法下载问题解决方案
- QT项目在VS上的编译,windows.h与winsock2.h存在多个重定义的问题的解决方法。