From da16724e7a801ab1744938518375e5d898535a43 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 17 Oct 2009 16:13:24 +0000 Subject: [PATCH] Fix for windres flags used in Win64 mingw build. We must explicitly define WX_CPU_AMD64 when compiling using mingw64 and configure as wx/msw/genrcdefs.h is not used in this case and even if it were, it wouldn't work because g++ doesn't define _M_AMD64 (unlike MSVC). So just add the flag directly to windres command line in configure. Closes #11336. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 4 +++- configure.in | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 3178dd9c23..4a28b906f7 100755 --- a/configure +++ b/configure @@ -28363,6 +28363,8 @@ fi case "${host}" in x86_64-*-mingw32* ) LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lwctl3d32 -ladvapi32 -lwsock32 -lgdi32" + + WINDRES_CPU_DEFINE="--define WX_CPU_AMD64" ;; * ) LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32" @@ -50931,7 +50933,7 @@ echo "$as_me: error: Required windres program not found" >&2;} { (exit 1); exit 1; }; } fi - RESCOMP="$WINDRES" + RESCOMP="$WINDRES $WINDRES_CPU_DEFINE" fi if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then diff --git a/configure.in b/configure.in index 5ce3ee7c74..3312a0a69e 100644 --- a/configure.in +++ b/configure.in @@ -2737,6 +2737,11 @@ if test "$USE_WIN32" = 1 ; then x86_64-*-mingw32* ) dnl --- For mingw-w64 lctl3d32's name has changed LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lwctl3d32 -ladvapi32 -lwsock32 -lgdi32" + + dnl we need to define this to embed the manifest for correct + dnl platform from wx/msw/wx.rc (this is not needed for x86 which is + dnl the default in wx/msw/rcdefs.h) + WINDRES_CPU_DEFINE="--define WX_CPU_AMD64" ;; * ) LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32" @@ -7845,7 +7850,7 @@ if test "$wxUSE_MSW" = 1 ; then AC_MSG_ERROR([Required windres program not found]) fi - RESCOMP="$WINDRES" + RESCOMP="$WINDRES $WINDRES_CPU_DEFINE" fi if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then