当前位置:   article > 正文

wxWidgets 3.1.5 Win10下编译_windows 10 wxwidgets 编译

windows 10 wxwidgets 编译

下载wxWidgets 3.1.5

我去了官网下载了一下wxWidgets 3.1.5```

wxWidgets 3.1.5:link.

下载之后我解压放到我的硬盘

在目录上找到/docs/msw/install.md

我选择了mingw的编译器

0. Open MSYS or Cygwin shell prompt.

1. Create a build directory: it is is strongly recommended to not
   build the library in the directory containing the sources (`$WXWIN`)
   but to create a separate build directory instead. The build
   directory can be placed anywhere (using the fastest available disk
   may be a good idea), but in this example we create it as a
   subdirectory of the source one:

        $ cd $WXWIN
        $ mkdir build-debug
        $ cd build-debug

2. Run configure passing it any of the options shown by "configure
   --help". Notice that configure builds shared libraries by default,
   use --disable-shared to build static ones. For example:

        $ ../configure --enable-debug

3. Build the library:

        $ make

4. Test the library build by building the minimal sample:

        $ cd samples/minimal
        $ make

5. Optionally install the library in a global location

        $ make install

   Notice that there is not much benefice to installing under Windows
   so this step can usually be omitted.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34

我在实际过程中第二步出问题了。

显示如下:

checking for localtime_r... yes
checking for gmtime_r... yes
checking how many arguments gethostbyname_r() takes... cannot find function declaration in netdb.h
checking for gethostbyname... yes
checking how many arguments getservbyname_r() takes... no
checking for getservbyname... yes
configure: WARNING: Catching fatal exceptions not currently supported on this system, wxApp::OnFatalException will not be called
checking xlocale.h usability... no
checking xlocale.h presence... no
checking for xlocale.h... no
checking for locale_t... no
configure: WARNING: No locale_t support, wxXLocale won't be available
checking for gettimeofday... yes
checking whether gettimeofday takes two arguments... yes
checking for timezone variable in <time.h>... timezone
checking for localtime... yes
checking for tm_gmtoff in struct tm... yes
checking for _NL_TIME_FIRST_WEEKDAY in langinfo.h... no
checking for setpriority... yes
checking for python... /usr/bin/python
checking if debug help API is available... yes
checking if GDI+ is available... yes
checking CXXWARNINGS for gcc -Woverloaded-virtual... -Woverloaded-virtual
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for ar... (cached) ar
checking for strip... strip
checking for nm... nm
checking if make is GNU make... yes
checking for dependency tracking method... gcc
checking for windres... windres
checking whether make sets $(MAKE)... (cached) yes
checking whether catch.hpp file exists... no
configure: error:
    CATCH (C++ Automated Test Cases in Headers) is required, the required file
    ../3rdparty/catch/include/catch.hpp couldn't be found.

    You might need to run

        git submodule update --init 3rdparty/catch

    to fix this.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
当然我装有git,直接运行“git submodule update --init 3rdparty/catch”不行。

我去网站找,找到了如下:
Github/colonelsammy/catch : link.
下载好解压到:./3rdparty/catch/目录上。
再运行:

$........./wxWidgets-master/build-debug
$ ../configure --enable-debug
checking build system type... x86_64-pc-cygwin
checking host system type... x86_64-pc-cygwin
checking for toolkit... msw
checking for gcc... 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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
...
...
...
...
...
config.status: creating lib/wx/include/msw-unicode-3.1/wx/setup.h
config.status: executing rcdefs.h commands
config.status: executing wx-config commands

Configured wxWidgets 3.1.5 for `x86_64-pc-cygwin'

  Which GUI toolkit should wxWidgets use?                 msw
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               sys
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       lzma               yes
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                no


  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
运行第三步$ make

最后又出现了错误:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: basedll_filename.o:filename.cpp:(.rdata$.refptr.IID_IPersistFile[.refptr.IID_IPersistFile]+0x0): undefined reference to `IID_IPersistFile'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: basedll_filename.o:filename.cpp:(.rdata$.refptr.IID_IShellLinkW[.refptr.IID_IShellLinkW]+0x0): undefined reference to `IID_IShellLinkW'
collect2: error: ld returned 1 exit status
make: *** [Makefile:14153: /cygdrive/e/ReadCode/wxWidgets-master/build-debug/lib/cygwxbase315u_gcc_custom-5.dll] Error 1
  • 1
  • 2
  • 3
  • 4
先不管,先运行第四步、

还是通不过。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/40376
推荐阅读
相关标签
  

闽ICP备14008679号