赞
踩
wxWidgets 3.1.5:link.
我选择了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.
显示如下:
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.
我去网站找,找到了如下:
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
最后又出现了错误:
/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
还是通不过。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。