<p dir="ltr">I build static FFmpeg libs for Windows 64 bit. Configuring as follows:</p>
<p dir="ltr">./configure --disable-everything --enable-static --disable-shared --enable-memalign-hack --disable-debug --enable-stripping --enable-protocol=file --enable-yasm --enable-decoder=mp3,mpeg4,h264 --enable-muxer=mp4,avi --enable-encoder=mjpeg .</p>
<p dir="ltr">The application is built in Visual Studio 2012 with/MT option and linked with libavformat.a,libavcodec.a etc. I also link it with libmingwex.a,libgcc.a.</p>
<p dir="ltr">The linker fails with the following errors:</p>
<p dir="ltr">6>libavformat.a(file.o) : error LNK2001: unresolved external symbol __imp__wrmdir <br>
6>libavformat.a(file.o) : error LNK2001: unresolved external symbol __imp__rmdir <br>
6>libavformat.a(file.o) : error LNK2001: unresolved external symbol __imp__wunlink <br>
6>libavformat.a(file.o) : error LNK2001: unresolved external symbol __imp__unlink <br>
6>libavutil.a(time.o) : error LNK2001: unresolved external symbol clock_gettime <br>
6>libavutil.a(time.o) : error LNK2001: unresolved external symbol nanosleep </p>
<p dir="ltr">As for the 2 latter errors, I can solve them by manually defining macros in config.h: #define HAVE_NANOSLEEP 1 and #define HAVE_CLOCK_GETTIME 1.</p>
<p dir="ltr">The question is how to solve the former 4. These look like functions imported from a dll (__impprefix), but my application is built with /MT, and I don't want any dynamic dependencies in FFmpeg. How to get rid of them?</p>
<p dir="ltr">I tried to configure FFmpeg with --extra-cflags="-static", but it doesn't help.</p>
<p dir="ltr">Thanks!</p>