compat/windows/makedef: Allow building shared libs with MSVC under WSL
authorCyber Sinh <cyber.sinh@free.fr>
Fri, 29 Dec 2017 01:59:08 +0000 (02:59 +0100)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Tue, 23 Apr 2019 23:41:13 +0000 (01:41 +0200)
A similar patch was posted by Gilles Khouzam in his blog.

compat/windows/makedef

index 7258b94..add8222 100755 (executable)
@@ -48,7 +48,7 @@ trap 'rm -f -- $libname' EXIT
 if [ -n "$AR" ]; then
     $AR rcs ${libname} $@ >/dev/null
 else
-    lib -out:${libname} $@ >/dev/null
+    lib.exe -out:${libname} $@ >/dev/null
 fi
 if [ $? != 0 ]; then
     echo "Could not create temporary library." >&2
@@ -108,7 +108,7 @@ if [ -n "$NM" ]; then
               cut -d' ' -f3 |
               sed -e "s/^${prefix}//")
 else
-    dump=$(dumpbin -linkermember:1 ${libname} |
+    dump=$(dumpbin.exe -linkermember:1 ${libname} |
               sed -e '/public symbols/,$!d' -e '/^ \{1,\}Summary/,$d' -e "s/ \{1,\}${prefix}/ /" -e 's/ \{1,\}/ /g' |
               tail -n +2 |
               cut -d' ' -f3)