[x264-devel] x264 dll in windows

BugMaster BugMaster at narod.ru
Mon Dec 2 18:17:18 CET 2013


On Mon, 2 Dec 2013 20:42:34 +0400, BugMaster wrote:
> On Mon, 2 Dec 2013 21:33:30 +0530, Karthick Kumar wrote:
>> I try to compile x264 source code to generate the lib and dll to
>> use them in visual studio 2010. I compiled using mingw tool. 
>> ./configure --disable-cli --enable-shared
>> --extra-ldflags=-Wl,--output-def=libx264.def
>>   


>> The generated dll has dependency on pthreadgc2.dll if threads are
>> posix and dependent on libgcc_s_dw2-1.dll if threads are win32. So I
>> would place those dependent files to use that x264.dll. 
>>   Can anyone tell, how to build x264 dll so that, there are no dependencies during runtime?

> Hi. If you have both static and shared libraries you link with than you
> can choose to link with static one (shared are default iirc) by
> specifying -static flag for linker. In you case configure should be:

> ./configure --disable-cli --enable-shared
> --extra-ldflags="-Wl,-static -Wl,--output-def=libx264.def"

> But I am not sure this will help with libgcc_s_dw2-1.dll dependecy. I
> would recommend to download MinGW-W64 version that doesn't depend on
> such things by default (like the one from
> http://komisar.gin.by/mingw/index.html or http://files.1f0.de/mingw/)

Here the configure commandline that should fix libgcc_s_dw2-1.dll
dependecy:

./configure --disable-cli --enable-shared --extra-ldflags="-static -Wl,--output-def=libx264.def"

i.e. no need for "-Wl,".

btw. iirc it is bad idea to generate def file this way for MSVS.



More information about the x264-devel mailing list