[Libav-user] Compile libAV + libswsscale for QNX

K4 anatoliy-leshin at yandex.ru
Thu Mar 27 14:01:49 CET 2014


Hey again, Carl. I want to ask you the main question:

I have my project that uses libavcodec (i use only video decoding). When i
build it for Linux - all is ok, project builds, runs and work correctly. But
when i try to cross compile it for qnx - i have problems with includes.

There are headers of libav:
#include "libswscale/swscale.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/mathematics.h"
#include "libavutil/samplefmt.h"

------------------------------------------------

These headers are wrote by using "C" language and when i'm compilile it
under Linux i just use "extern "C" " and all is ok.
extern "C" {
#include "libswscale/swscale.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/mathematics.h"
#include "libavutil/samplefmt.h"
}

-----------------------------------------------

But when i compile it for qnx i have mistakes:
/opt/qnx650/target/qnx6//usr/include/xtgmath.h:116: error: template with C
linkage
/opt/qnx650/target/qnx6//usr/include/xtgmath.h:150: error: template with C
linkage
/opt/qnx650/target/qnx6//usr/include/xtgmath.h:157: error: template with C
linkage

It happens because libav headers includes another headers (xtgmath.h for
example) and they have c++ stuff inside. So i cannot simply wrap libav
headers with "extern "C" ". 

Do you know how to fix it?





--
View this message in context: http://libav-users.943685.n4.nabble.com/Compile-libAV-libswsscale-for-QNX-tp4659484p4659513.html
Sent from the libav-users mailing list archive at Nabble.com.


More information about the Libav-user mailing list