MinGW: Use --add-stdcall-alias linker option
authorDaniel Drake <dan@reactivated.net>
Sun, 19 Sep 2010 13:21:01 +0000 (14:21 +0100)
committerDaniel Drake <dan@reactivated.net>
Sun, 19 Sep 2010 14:09:17 +0000 (15:09 +0100)
Naming of symbols inside the library is inconsistent on Windows:
http://wyw.dcweb.cn/stdcall.htm

Use this linker option to add aliases which add compatibility with
the "MSVC DLL" platform when a DEF file is used. It also better matches
the appearance of the Windows API itself.

configure.ac

index 39b11f2..84c361d 100644 (file)
@@ -55,7 +55,7 @@ case $host in
        threads="windows"
        LIBS="-lsetupapi -lole32 -ladvapi32"
        # -avoid-version to avoid a naming scheme such as libusb-0.dll
-       AM_LDFLAGS="-no-undefined -avoid-version"
+       AM_LDFLAGS="-no-undefined -avoid-version --add-stdcall-alias"
        AC_CHECK_TOOL(RC, windres, no)
        ;;
 *-cygwin*)