mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Error linking libavcodec


From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] Error linking libavcodec
Date: Tue, 9 Dec 2014 01:29:33 +1100

Welcome to MXE Alex,

> On 9 Dec 2014, at 00:20, Alex Zelid <address@hidden> wrote:
> 
>     avcodec_init();

Apparently, that function has been removed from ffmpeg, but I can’t find a 
proper link. Just remove it for the time being till you sort out the link 
errors.

> I compile it using:
> 
> ~/workspace/c_demo2_avcodec_basic$ i686-w64-mingw32.static-gcc 
> -I/home/alex/opt/mxe/usr/i686-w64-mingw32.static/include main.c -lkernel32 
> -L/home/alex/opt/mxe/usr/i686-w64-mingw32.static/lib 
> -L/home/alex/opt/mxe/usr/i686-w64-mingw32.static/lib -lusp10 -lmsimg32 
> -lgdi32 -lbz2 -lharfbuzz_too -lws2_32 -lole32 -lshlwapi -lavutil -lwinmm 
> -lwsock32 -lmman -lpthread -lz -lavutil -lm -lavformat -lavutil -lmp3lame -lz 
> -lbz2 -llzma -lswresample -lavcodec -lavutil -lavformat -lz -lm -llzma 
> -lswresample -lmp3lame -lvorbisenc -lrtmp -lswscale

Using pkg-config is probably the easiest way:

i686-w64-mingw32. static-gcc main.c -o main.exe 
`i686-w64-mingw32.static-pkg-config --libs --cflags libavcodec`

Cheers,

Tony




reply via email to

[Prev in Thread] Current Thread [Next in Thread]