读书人

bcb调用libx264-129解决方案

发布时间: 2013-07-09 09:50:47 作者: rapoo

bcb调用libx264-129
在网上下了个编译好的libx264-129.dll,和相应的头文件x264_config.h,x264.h
implib成lib后加入lib到项目,然后
extern "C"
{
#include "x264.h"
#include "x264_config.h"
}

提示warning You must include stdint.h or inttypes.h before x264.h
将下载的stdint.h,inttypes.h 加入项目就是一堆的错误:
type name expected,multi declare
[解决办法]
unit1.cpp中改为:

#include "rtmp.h"
#include "rtmp_sys.h"
#include "log.h"

extern "C"
{
#include "x264.h"
}


在x264.h中,找到下面的代码:
#if !defined(_STDINT_H) && !defined(_STDINT_H_) && \
!defined(_INTTYPES_H) && !defined(_INTTYPES_H_)
# ifdef _MSC_VER
# pragma message("You must include stdint.h or inttypes.h before x264.h")
# else
# warning You must include stdint.h or inttypes.h before x264.h
# endif
#endif

改为:
#if !defined(_STDINT_H) && !defined(_STDINT_H_) && \
!defined(_INTTYPES_H) && !defined(_INTTYPES_H_)
//# ifdef _MSC_VER
//# pragma message("You must include stdint.h or inttypes.h before x264.h")
//# else
//# warning You must include stdint.h or inttypes.h before x264.h
//# endif
#endif


我猜测,你的这些文件已经被改过了,所以这里明显的是一个错误的提示,因为代码中已经明显地在rtmp.h中包含stdint.h了,也可能是整套文件互不匹配,推荐你下载完整的RTMP方案

读书人网 >C++ Builder

热点推荐