代码之家  ›  专栏  ›  技术社区  ›  Bendystraw

Mingw32无法识别wx小部件

  •  0
  • Bendystraw  · 技术社区  · 7 年前

    我正在尝试使用mingw32为windows32编译一个应用程序。它有一个makefile,当我正常使用 ./configure ,工作正常。 但是,当我将主机设置为--host=i686-w64-mingw32时,会发生以下情况:

    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... i686-w64-mingw32
    checking target system type... i686-w64-mingw32
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for i686-w64-mingw32-strip... i686-w64-mingw32-strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking building for Win32... yes
    checking for i686-w64-mingw32-gcc... i686-w64-mingw32-gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.exe
    checking for suffix of executables... .exe
    checking whether we are cross compiling... yes
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether i686-w64-mingw32-gcc accepts -g... yes
    checking for i686-w64-mingw32-gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of i686-w64-mingw32-gcc... gcc3
    checking for i686-w64-mingw32-g++... i686-w64-mingw32-g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether i686-w64-mingw32-g++ accepts -g... yes
    checking dependency style of i686-w64-mingw32-g++... gcc3
    checking for i686-w64-mingw32-ranlib... i686-w64-mingw32-ranlib
    checking for sdl-config... /usr/bin/sdl-config
    checking for SDL - version >= 1.2.8... cross compiling; assumed OK...
    yes
    checking for wx-config... /usr/bin/wx-config
    checking for wxWidgets version >= 2.8.9... no
    configure: error:
            wxWidgets does not seem to be installed on your system.
    
            If you think wxWidgets >= 2.8.9 is installed,
            please check that wx-config is in path, the directory
            where wxWidgets libraries are installed (returned by
            'wx-config --libs' command) is in LD_LIBRARY_PATH or
            equivalent variable.
    

    这是什么原因?正如你从成功中看到的/配置,我已经安装了wxWidgets 3.0.2。已安装MinGW版本4.0.4-2。这些版本相互配合吗?显然,wxWidgets已经配置好了,因为它正常工作。我不明白为什么它突然因为主机不同而找不到wxwidgets。

    配置。日志文件:

    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.
    
    It was created by sound-of-sorting configure 0.6.5, which was
    generated by GNU Autoconf 2.69.  Invocation command line was
    
      $ ./configure --host=i686-w64-mingw32 --with-wx-prefix=/usr/i686-w64-mingw32
    
    ## --------- ##
    ## Platform. ##
    ## --------- ##
    
    hostname = JOHNCENA
    uname -m = x86_64
    uname -r = 4.4.0-43-Microsoft
    uname -s = Linux
    uname -v = #1-Microsoft Wed Dec 31 14:42:53 PST 2014
    
    /usr/bin/uname -p = unknown
    /bin/uname -X     = unknown
    
    /bin/arch              = unknown
    /usr/bin/arch -k       = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo      = unknown
    /bin/machine           = unknown
    /usr/bin/oslevel       = unknown
    /bin/universe          = unknown
    
    PATH: /usr/local/sbin
    PATH: /usr/local/bin
    PATH: /usr/sbin
    PATH: /usr/bin
    PATH: /sbin
    PATH: /bin
    PATH: /usr/games
    PATH: /usr/local/games
    PATH: /mnt/c/ProgramData/Oracle/Java/javapath_target_3578562
    PATH: /mnt/c/Windows/System32
    PATH: /mnt/c/Windows
    PATH: /mnt/c/Windows/System32/wbem
    PATH: /mnt/c/Windows/System32/WindowsPowerShell/v1.0
    PATH: /mnt/c/Windows/System32
    PATH: /mnt/c/Windows
    PATH: /mnt/c/Windows/System32/wbem
    PATH: /mnt/c/Windows/System32/WindowsPowerShell/v1.0
    PATH: /mnt/c/Program Files/Microsoft DNX/Dnvm
    PATH: /mnt/c/Program Files/Microsoft SQL Server/110/Tools/Binn
    PATH: /mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit
    PATH: /mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common
    PATH: /mnt/c/Windows/System32
    PATH: /mnt/c/Windows
    PATH: /mnt/c/Windows/System32/wbem
    PATH: /mnt/c/Windows/System32/WindowsPowerShell/v1.0
    PATH: /mnt/c/Users/Bendy/AppData/Local/Microsoft/WindowsApps
    PATH: /snap/bin
    
    
    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##
    
    configure:2067: checking build system type
    configure:2081: result: x86_64-unknown-linux-gnu
    configure:2101: checking host system type
    configure:2114: result: i686-w64-mingw32
    configure:2134: checking target system type
    configure:2147: result: i686-w64-mingw32
    configure:2190: checking for a BSD-compatible install
    configure:2258: result: /usr/bin/install -c
    configure:2269: checking whether build environment is sane
    configure:2324: result: yes
    configure:2383: checking for i686-w64-mingw32-strip
    configure:2399: found /usr/bin/i686-w64-mingw32-strip
    configure:2410: result: i686-w64-mingw32-strip
    configure:2475: checking for a thread-safe mkdir -p
    configure:2514: result: /bin/mkdir -p
    configure:2521: checking for gawk
    configure:2537: found /usr/bin/gawk
    configure:2548: result: gawk
    configure:2559: checking whether make sets $(MAKE)
    configure:2581: result: yes
    configure:2671: checking building for Win32
    configure:2676: result: yes
    configure:2730: checking for i686-w64-mingw32-gcc
    configure:2746: found /usr/bin/i686-w64-mingw32-gcc
    configure:2757: result: i686-w64-mingw32-gcc
    configure:3026: checking for C compiler version
    configure:3035: i686-w64-mingw32-gcc --version >&5
    i686-w64-mingw32-gcc (GCC) 5.3.1 20160211
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    configure:3046: $? = 0
    configure:3035: i686-w64-mingw32-gcc -v >&5
    Using built-in specs.
    COLLECT_GCC=i686-w64-mingw32-gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/5.3-win32/lto-wrapper
    Target: i686-w64-mingw32
    Configured with: ../../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libexecdir='/usr/lib/gcc-mingw-w64' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-shared --enable-static --disable-multilib --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes --with-tune=generic --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++ --enable-lto --with-plugin-ld --enable-threads=win32 --program-suffix=-win32 --program-prefix=i686-w64-mingw32- --target=i686-w64-mingw32 --with-as=/usr/bin/i686-w64-mingw32-as --with-ld=/usr/bin/i686-w64-mingw32-ld --disable-libatomic
    Thread model: win32
    gcc version 5.3.1 20160211 (GCC) 
    configure:3046: $? = 0
    configure:3035: i686-w64-mingw32-gcc -V >&5
    i686-w64-mingw32-gcc: error: unrecognized command line option '-V'
    i686-w64-mingw32-gcc: fatal error: no input files
    compilation terminated.
    configure:3046: $? = 1
    configure:3035: i686-w64-mingw32-gcc -qversion >&5
    i686-w64-mingw32-gcc: error: unrecognized command line option '-qversion'
    i686-w64-mingw32-gcc: fatal error: no input files
    compilation terminated.
    configure:3046: $? = 1
    configure:3066: checking whether the C compiler works
    configure:3088: i686-w64-mingw32-gcc -g -Wno-unused-local-typedefs   conftest.c  >&5
    configure:3092: $? = 0
    configure:3140: result: yes
    configure:3143: checking for C compiler default output file name
    configure:3145: result: a.exe
    configure:3151: checking for suffix of executables
    configure:3158: i686-w64-mingw32-gcc -o conftest.exe -g -Wno-unused-local-typedefs   conftest.c  >&5
    configure:3162: $? = 0
    configure:3184: result: .exe
    configure:3206: checking whether we are cross compiling
    configure:3214: i686-w64-mingw32-gcc -o conftest.exe -g -Wno-unused-local-typedefs   conftest.c  >&5
    configure:3218: $? = 0
    configure:3225: ./conftest.exe
    ./conftest.exe: Invalid argument
    configure:3229: $? = 1
    configure:3244: result: yes
    configure:3249: checking for suffix of object files
    configure:3271: i686-w64-mingw32-gcc -c -g -Wno-unused-local-typedefs  conftest.c >&5
    configure:3275: $? = 0
    configure:3296: result: o
    configure:3300: checking whether we are using the GNU C compiler
    configure:3319: i686-w64-mingw32-gcc -c -g -Wno-unused-local-typedefs  conftest.c >&5
    configure:3319: $? = 0
    configure:3328: result: yes
    configure:3337: checking whether i686-w64-mingw32-gcc accepts -g
    configure:3357: i686-w64-mingw32-gcc -c -g  conftest.c >&5
    configure:3357: $? = 0
    configure:3398: result: yes
    configure:3415: checking for i686-w64-mingw32-gcc option to accept ISO C89
    configure:3478: i686-w64-mingw32-gcc  -c -g -Wno-unused-local-typedefs  conftest.c >&5
    configure:3478: $? = 0
    configure:3491: result: none needed
    configure:3522: checking for style of include used by make
    configure:3550: result: GNU
    configure:3576: checking dependency style of i686-w64-mingw32-gcc
    configure:3687: result: gcc3
    configure:3716: checking for i686-w64-mingw32-g++
    configure:3732: found /usr/bin/i686-w64-mingw32-g++
    configure:3743: result: i686-w64-mingw32-g++
    configure:3814: checking for C++ compiler version
    configure:3823: i686-w64-mingw32-g++ --version >&5
    i686-w64-mingw32-g++ (GCC) 5.3.1 20160211
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    configure:3834: $? = 0
    configure:3823: i686-w64-mingw32-g++ -v >&5
    Using built-in specs.
    COLLECT_GCC=i686-w64-mingw32-g++
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/5.3-win32/lto-wrapper
    Target: i686-w64-mingw32
    Configured with: ../../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libexecdir='/usr/lib/gcc-mingw-w64' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-shared --enable-static --disable-multilib --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes --with-tune=generic --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++ --enable-lto --with-plugin-ld --enable-threads=win32 --program-suffix=-win32 --program-prefix=i686-w64-mingw32- --target=i686-w64-mingw32 --with-as=/usr/bin/i686-w64-mingw32-as --with-ld=/usr/bin/i686-w64-mingw32-ld --disable-libatomic
    Thread model: win32
    gcc version 5.3.1 20160211 (GCC) 
    configure:3834: $? = 0
    configure:3823: i686-w64-mingw32-g++ -V >&5
    i686-w64-mingw32-g++: error: unrecognized command line option '-V'
    i686-w64-mingw32-g++: fatal error: no input files
    compilation terminated.
    configure:3834: $? = 1
    configure:3823: i686-w64-mingw32-g++ -qversion >&5
    i686-w64-mingw32-g++: error: unrecognized command line option '-qversion'
    i686-w64-mingw32-g++: fatal error: no input files
    compilation terminated.
    configure:3834: $? = 1
    configure:3838: checking whether we are using the GNU C++ compiler
    configure:3857: i686-w64-mingw32-g++ -c -g -Wno-unused-local-typedefs  conftest.cpp >&5
    configure:3857: $? = 0
    configure:3866: result: yes
    configure:3875: checking whether i686-w64-mingw32-g++ accepts -g
    configure:3895: i686-w64-mingw32-g++ -c -g  conftest.cpp >&5
    configure:3895: $? = 0
    configure:3936: result: yes
    configure:3961: checking dependency style of i686-w64-mingw32-g++
    configure:4072: result: gcc3
    configure:4090: checking for i686-w64-mingw32-ranlib
    configure:4106: found /usr/bin/i686-w64-mingw32-ranlib
    configure:4117: result: i686-w64-mingw32-ranlib
    configure:4234: checking for sdl-config
    configure:4252: found /usr/bin/sdl-config
    configure:4265: result: /usr/bin/sdl-config
    configure:4275: checking for SDL - version >= 1.2.8
    configure:4377: result: yes
    configure:4513: checking for wx-config
    configure:4532: found /usr/i686-w64-mingw32/bin/wx-config
    configure:4545: result: /usr/i686-w64-mingw32/bin/wx-config
    configure:4560: checking for wxWidgets version >= 2.8.9
    configure:4675: result: no
    configure:4749: error: 
        wxWidgets does not seem to be installed on your system.
    
            If you think wxWidgets >= 2.8.9 is installed,
        please check that wx-config is in path, the directory
        where wxWidgets libraries are installed (returned by
        'wx-config --libs' command) is in LD_LIBRARY_PATH or
        equivalent variable.
    
    
    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##
    
    ac_cv_build=x86_64-unknown-linux-gnu
    ac_cv_c_compiler_gnu=yes
    ac_cv_cxx_compiler_gnu=yes
    ac_cv_env_CCC_set=
    ac_cv_env_CCC_value=
    ac_cv_env_CC_set=
    ac_cv_env_CC_value=
    ac_cv_env_CFLAGS_set=
    ac_cv_env_CFLAGS_value=
    ac_cv_env_CPPFLAGS_set=
    ac_cv_env_CPPFLAGS_value=
    ac_cv_env_CXXFLAGS_set=
    ac_cv_env_CXXFLAGS_value=
    ac_cv_env_CXX_set=
    ac_cv_env_CXX_value=
    ac_cv_env_LDFLAGS_set=
    ac_cv_env_LDFLAGS_value=
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_host_alias_set=set
    ac_cv_env_host_alias_value=i686-w64-mingw32
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_exeext=.exe
    ac_cv_host=i686-w64-mingw32
    ac_cv_objext=o
    ac_cv_path_SDL_CONFIG=/usr/bin/sdl-config
    ac_cv_path_WX_CONFIG_PATH=/usr/i686-w64-mingw32/bin/wx-config
    ac_cv_path_install='/usr/bin/install -c'
    ac_cv_path_mkdir=/bin/mkdir
    ac_cv_prog_AWK=gawk
    ac_cv_prog_CC=i686-w64-mingw32-gcc
    ac_cv_prog_CXX=i686-w64-mingw32-g++
    ac_cv_prog_RANLIB=i686-w64-mingw32-ranlib
    ac_cv_prog_STRIP=i686-w64-mingw32-strip
    ac_cv_prog_cc_c89=
    ac_cv_prog_cc_g=yes
    ac_cv_prog_cxx_g=yes
    ac_cv_prog_make_make_set=yes
    ac_cv_target=i686-w64-mingw32
    am_cv_CC_dependencies_compiler_type=gcc3
    am_cv_CXX_dependencies_compiler_type=gcc3
    
    ## ----------------- ##
    ## Output variables. ##
    ## ----------------- ##
    
    ACLOCAL='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run aclocal-1.12'
    AMDEPBACKSLASH='\'
    AMDEP_FALSE='#'
    AMDEP_TRUE=''
    AMTAR='$${TAR-tar}'
    AUTOCONF='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run autoconf'
    AUTOHEADER='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run autoheader'
    AUTOMAKE='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run automake-1.12'
    AWK='gawk'
    CC='i686-w64-mingw32-gcc'
    CCDEPMODE='depmode=gcc3'
    CFLAGS='-g -Wno-unused-local-typedefs'
    CPPFLAGS=''
    CXX='i686-w64-mingw32-g++'
    CXXDEPMODE='depmode=gcc3'
    CXXFLAGS='-g -Wno-unused-local-typedefs'
    CYGPATH_W='echo'
    DEFS=''
    DEPDIR='.deps'
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EXEEXT='.exe'
    GOT_RESCOMP_FALSE=''
    GOT_RESCOMP_TRUE=''
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
    LDFLAGS=''
    LIBOBJS=''
    LIBS=''
    LTLIBOBJS=''
    MAKEINFO='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run makeinfo'
    MKDIR_P='/bin/mkdir -p'
    OBJEXT='o'
    ON_WIN32_FALSE='#'
    ON_WIN32_TRUE=''
    PACKAGE='sound-of-sorting'
    PACKAGE_BUGREPORT=''
    PACKAGE_NAME='sound-of-sorting'
    PACKAGE_STRING='sound-of-sorting 0.6.5'
    PACKAGE_TARNAME='sound-of-sorting'
    PACKAGE_URL=''
    PACKAGE_VERSION='0.6.5'
    PATH_SEPARATOR=':'
    RANLIB='i686-w64-mingw32-ranlib'
    SDL_CFLAGS='-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT'
    SDL_CONFIG='/usr/bin/sdl-config'
    SDL_LIBS='-L/usr/lib/x86_64-linux-gnu -lSDL'
    SET_MAKE=''
    SHELL='/bin/bash'
    STRIP='i686-w64-mingw32-strip'
    VERSION='0.6.5'
    WX_CFLAGS=''
    WX_CFLAGS_ONLY=''
    WX_CONFIG_PATH='/usr/i686-w64-mingw32/bin/wx-config'
    WX_CPPFLAGS=''
    WX_CXXFLAGS=''
    WX_CXXFLAGS_ONLY=''
    WX_LIBS=''
    WX_LIBS_STATIC=''
    WX_RESCOMP=''
    WX_VERSION=''
    WX_VERSION_MAJOR=''
    WX_VERSION_MICRO=''
    WX_VERSION_MINOR=''
    ac_ct_CC=''
    ac_ct_CXX=''
    am__EXEEXT_FALSE=''
    am__EXEEXT_TRUE=''
    am__fastdepCC_FALSE='#'
    am__fastdepCC_TRUE=''
    am__fastdepCXX_FALSE='#'
    am__fastdepCXX_TRUE=''
    am__include='include'
    am__isrc=''
    am__leading_dot='.'
    am__nodep='_no'
    am__quote=''
    am__tar='$${TAR-tar} chof - "$$tardir"'
    am__untar='$${TAR-tar} xf -'
    bindir='${exec_prefix}/bin'
    build='x86_64-unknown-linux-gnu'
    build_alias=''
    build_cpu='x86_64'
    build_os='linux-gnu'
    build_vendor='unknown'
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    dvidir='${docdir}'
    exec_prefix='NONE'
    host='i686-w64-mingw32'
    host_alias='i686-w64-mingw32'
    host_cpu='i686'
    host_os='mingw32'
    host_vendor='w64'
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    install_sh='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/install-sh'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    mkdir_p='$(MKDIR_P)'
    oldincludedir='/usr/include'
    pdfdir='${docdir}'
    prefix='NONE'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    runstatedir='${localstatedir}/run'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    sysconfdir='${prefix}/etc'
    target='i686-w64-mingw32'
    target_alias=''
    target_cpu='i686'
    target_os='mingw32'
    target_vendor='w64'
    
    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##
    
    /* confdefs.h */
    #define PACKAGE_NAME "sound-of-sorting"
    #define PACKAGE_TARNAME "sound-of-sorting"
    #define PACKAGE_VERSION "0.6.5"
    #define PACKAGE_STRING "sound-of-sorting 0.6.5"
    #define PACKAGE_BUGREPORT ""
    #define PACKAGE_URL ""
    #define PACKAGE "sound-of-sorting"
    #define VERSION "0.6.5"
    
    configure: exit 1
    
    1 回复  |  直到 7 年前
        1
  •  0
  •   VZ.    7 年前

    您正在尝试从Linux交叉编译到Windows。要想让它起作用,你需要 窗户 wxWidgets的版本,而不是第一个示例中的本机Linux版本。

    你真的想交叉编译吗?你所说的“仅仅因为主人不同”让人怀疑你是否真的是故意这样做的。