[FFmpeg-devel] Fix libssh static linkage on Windows

Lukasz M lukasz.m.luki at gmail.com
Mon Feb 10 22:16:28 CET 2014


>
>
> > Officially according to microsoft it is safe as any code in a shared dll
> on
>
> microsoft doesnt document LIBSSH_STATIC
>
>
> [...]
> >
> > libssh however has no stance on not using dllimport on a shared library
> and
> > there docs only state one or the other:
> > http://api.libssh.org/master/libssh_linking.html
>
> you are quite fixed on dllimport, yet your patch does not add dllimport
> it adds LIBSSH_STATIC.
>
> You seem to mix documented API with current behavior
>
> My question was, if adding LIBSSH_STATIC unconditional is safe per
> official libssh documentation
> AFAIK its not. so your patch uses it in a undocumeted way
>
> Using undocumeted things is not good. We would like to have wide
> compatibility. Both with future and past versions of libs and with
> potential forks and drop in replacements if such ever exist
>
> I suggest again to try to get this clarified at libssh
> it sure would help people if their docs spell out if using it for
> dynamic libs or non windows is safe, unsafe or undefined
>
> either way above are just my 2 cent
>
> patch review left to maintainer


I asked on their mailing list
http://www.libssh.org/archive/libssh/2014-02/0000057.html

The person who answerred told he's not a windows developer, but suggested
to set this on compiler commandline, which is the same as my first
thought was.

Maybe adding a comment with a hint would be more safe than that define.


More information about the ffmpeg-devel mailing list