[FFmpeg-devel] [PATCH] Proper support for building MSVC import libraries

Ramiro Polla ramiro
Sat Jul 21 02:11:02 CEST 2007


Hello,

Ramiro Ribeiro Polla wrote:
[...]
>>> +  echo "  --enable-msvc-implib     build MSVC import libs for dlls [default=no]"
>>>     
>>>       
>> Why this option?
>>   
>>     
>
> Because not every MinGW user wants to build MSVC import libs. But not 
> everyone wants pkgconfig files either, and they always get installed. So 
> it's also fine if this option doesn't exist. Instead, the 'lib' program 
> should be checked for in a common win32 specific section in configure.
>   

Done

[...]
>>>      enabled network && add_extralibs -lws2_32
>>>      ;;
>>>    cygwin*)
>>> @@ -1930,8 +1933,10 @@
>>>    echo "SLIBNAME=${SLIBNAME}" >> config.mak
>>>    echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
>>>    echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
>>> -  echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak
>>> -  echo "SLIB_INSTALL_EXTRA_CMD=${SLIB_INSTALL_EXTRA_CMD}" >> config.mak
>>> +  enabled msvc_implib &&
>>> +    echo "BUILD_MSVC_IMPLIB=yes" >> config.mak
>>>     
>>>       
>> Settings like this one should be done the generic way.
>>   
>>     
>
> I don't see how this differs from:
> if enabled shared; then
>   echo "BUILD_SHARED=yes" >> config.mak
>
> Could you, please, be more specific?
>
>   

Done differently.

[...]
>>>  install-lib-static: $(LIB)
>>>  	install -d "$(libdir)"
>>>  	install -m 644 $(LIB) "$(libdir)"
>>> -	$(LIB_INSTALL_EXTRA_CMD)
>>>
>>> +install-lib-msvc-implib: $(MSVC_IMPLIB)
>>> +	install -d "$(libdir)"
>>> +	install -m 644 $(MSVC_IMPLIB) "$(libdir)"
>>>     
>>>       
>> install-lib-static: $(LIB) $(MSVC_IMPLIB)
>> 	...
>>
>> Or some variation thereof.  I don't recall the exact semantics of
>> these targets.
>>
>>   
>>     
>
> Right, this can be simplified. I'll investigate further for the next patch.
>
>   

Hmmm... I had removed LIB_INSTALL_EXTRA_CMD by mistake. It's ranlib, and 
not related to msvc import libs.
Since ranlib can't run on msvc import libs, they can't be shared.

New patch attached.

Ramiro Polla
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: msvc_implib.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070720/f199341b/attachment.txt>



More information about the ffmpeg-devel mailing list