在Windows下基于libx264.a的Qt 4.8.2视频压缩

1、在用mingw 4.5.2编译x264后,生成libx264.a文件,将libx264.a和x264.h和x264_config.h拷贝到Qt工程中,将mingw/lib/libpthread.a拷贝到Qt工程中,在.pro中

LIB  += -L. -lx264 -lpthread

2、编译时会提示,找不到x264_param_parse函数定义,打开x264.h,在文件头#defineX264_X264_H下面加上

#ifdef__cplusplus

extern"C"{

#endif
在文件尾#endif之前加,

#ifdef__cplusplus

}

#endif

posted on 2014-05-23 15:15  zhangnianyong  阅读(454)  评论(0编辑  收藏  举报