[FFmpeg-devel] Warning when compiling ffmpeg using msvc toolchain with --enable-pthreads

Ramprasad N ramprasad85 at gmail.com
Wed Apr 15 19:50:59 CEST 2015


Hi,

When using an ffmpeg.exe built using msys and the msvc toolchain, at run
time a warning is displayed
[udp @ 00395860] 'circular_buffer_size' option was set but it is not
supported on this build (pthread support is required)

So, I wanted to enable pthread

I downloaded pthread-win32
Added the include and lib paths to the INCLUDE and PATH environment
variables
started visual studio 2013 desktop express vsvars.bat and started msys.bat

and did

../configure --toolchain=msvc --enable-pthreads --extra-libs=pthreadVC2.lib

output of configure now showed "threading support         pthreads" instead
of "threading support         win32threads"

and the runtime warning went away :-)

but while "make"ing it shows few warnings

CC      libavdevice/alldevices.o
cl : Command line warning D9002 : ignoring unknown option '-pthread'
and
LD      libavutil/avutil-54.dll
LINK : warning LNK4044: unrecognized option '/pthread'; ignored

As I understand "-pthread" is gcc specific, and I think it should not be
used with msvc's cl.exe.

But do I need to worry about the macros _REENTRANT or __USE_REENTRANT as
mentioned here

http://stackoverflow.com/questions/2127797/gcc-significance-of-pthread-flag-when-compiling
and
http://stackoverflow.com/questions/23250863/difference-between-pthread-and-lpthread-while-compiling
?

Thanks
Ramprasad


More information about the ffmpeg-devel mailing list