mingw64 compile ffmpeg source warning:pkg-config not found

Questions that occur when trying to compile FFmpeg.
Post Reply
ericking
Posts: 1
Joined: Fri Jun 27, 2014 5:39 am

mingw64 compile ffmpeg source warning:pkg-config not found

Post by ericking » Fri Jun 27, 2014 6:06 am

When I used mingw64 and msys for compile ffmpeg source "ffmpeg-20140627-git-134beb9.tar" to x64 libs,it produce a warning:pkg-config not found ,library detection may fail.
And then I used "make " in mingw terminal, it gives no erros but some "In function xxx: deprecated xxx".
and when I use a bash as below for produce "opencv_ffmpeg_64.dll",it will give nothing.
make.bat file:
set path=c:\MinGW64\mingw64\bin;%path% & gcc -m64 -Wall -shared -o opencv_ffmpeg_64.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat64 -lavcodec64 -lavdevice64 -lswscale64 -lavutil64 -lavfilter64 -lswresample64 -lws2_32
I dont know why, after "make",mingw gives me some infos as follow:
xxx(mingw64 path)/bin/ld.exe: skipping incompatible ../lib/libswresample64.a when searching for -lswresample64

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: mingw64 compile ffmpeg source warning:pkg-config not fou

Post by rogerdpack » Fri Jul 04, 2014 3:36 pm

what is the output of "file xxx" (path to your libswresample64.a file)

danielv
Posts: 1
Joined: Fri Aug 01, 2014 1:17 pm

Re: mingw64 compile ffmpeg source warning:pkg-config not fou

Post by danielv » Fri Aug 01, 2014 1:20 pm

pkg-config is not yet available! I need it too...

Can you please add it back?

Thank you

User avatar
Zeranoe
Site Admin
Posts: 703
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: mingw64 compile ffmpeg source warning:pkg-config not fou

Post by Zeranoe » Sun Aug 03, 2014 5:08 am

This looks like a pkg-config program issue and not a .pc file (built pkg-config files) related.

You need to have pkg-config installed to get around that error.
danielv wrote:pkg-config is not yet available! I need it too...
I believe you are referring to the .pc files generated by pkg-config during the build process. These files were removed because they are not portable and would require modification to operate on another machine.

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: mingw64 compile ffmpeg source warning:pkg-config not fou

Post by rogerdpack » Mon Aug 04, 2014 7:17 pm

danielv wrote:pkg-config is not yet available! I need it too...

Can you please add it back?

Thank you
you can/should install pkg-config first. Not sure how to do that in mingw-w64/msys environment, but I've heard it's possible.
you could also try cross compiling:
https://github.com/rdp/ffmpeg-windows-build-helpers
GL!
-roger-

Post Reply
'