标签:
OS: Windows XP sp3
IDE: VS2010
首先安装如下工具:
(1) Bazzar
https://launchpad.net/bzr/2.5/2.5.1/+download/bzr-2.5.1-1-setup.exe
(2) Bison from GnuWin32
http://jaist.dl.sourceforge.net/project/gnuwin32/bison/2.4.1/bison-2.4.1-setup.exe
(3) Cmake
https://cmake.org/files/v3.4/cmake-3.4.3-win32-x86.exe
V3.4.3是可以在XP中运行的。
然后执行编译:
检查系统变量path,以保证包含如下设置:
C:\Program Files\Bazaar;C:\GnuWin32\bin;C:\boost_1_61_0;C:\bo
ost_1_61_0\boost;C:\boost_1_61_0\bin\vc10\lib;C:\Program Files\CMake\bin
(1)cmake ..
Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp. C:\Documents and Settings\Administrator>d: D:\>cd mariadb-5.5.49 D:\mariadb-5.5.49>mkdir bld D:\mariadb-5.5.49>cd bld D:\mariadb-5.5.49\bld>cmake .. -- Building for: Visual Studio 10 2010 -- Running cmake version 3.4.3 -- The C compiler identification is MSVC 16.0.40219.1 -- The CXX compiler identification is MSVC 16.0.40219.1 -- Check for working C compiler using: Visual Studio 10 2010 -- Check for working C compiler using: Visual Studio 10 2010 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Visual Studio 10 2010 -- Check for working CXX compiler using: Visual Studio 10 2010 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for isnan -- Looking for isnan - not found -- Looking for snprintf -- Looking for snprintf - not found -- Looking for _snprintf -- Looking for _snprintf - found -- MariaDB 5.5.49 -- Check size of void * -- Check size of void * - done -- Packaging as: mariadb-5.5.49-win32 -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE -- Looking for isnan -- Looking for isnan - not found -- Check size of time_t -- Check size of time_t - done -- Performing Test STRUCT_TIMESPEC_HAS_TV_SEC -- Performing Test STRUCT_TIMESPEC_HAS_TV_SEC - Failed -- Performing Test STRUCT_TIMESPEC_HAS_TV_NSEC -- Performing Test STRUCT_TIMESPEC_HAS_TV_NSEC - Failed -- Looking for malloc_stats_print in jemalloc -- Looking for malloc_stats_print in jemalloc - not found -- Performing Test HAVE_WVLA -- Performing Test HAVE_WVLA - Failed -- Performing Test HAVE_WERROR -- Performing Test HAVE_WERROR - Failed -- Boost version: 1.61.0 -- Performing Test HAVE_XUCRED -- Performing Test HAVE_XUCRED - Failed -- Looking for MFC -- Looking for MFC - found -- Configuring done -- Generating done -- Build files have been written to: D:/mariadb-5.5.49/bld D:\mariadb-5.5.49\bld>
(2) sql/sql_locale.cc
使用UE打开此文件并另存为同名。不同之处在于,更改“Format”!
(3) 生成sln
cmake --build . --config Relwithdebinfo
(4) 编译
使用VS2010打开bld/MySQL.sln,并编译即可。
最后,拷贝文件。
拷贝以下两个文件覆盖到D:\progFiles\MariaDB55\bin,以替换不能在XP运行的程序。
bld\sql\RelWithDebInfo\mysqld.exe
bld\sql\RelWithDebInfo\mysqld.pdb
参考文档:
1. Building MariaDB on Windows
https://mariadb.com/kb/en/mariadb/Building_MariaDB_on_Windows/
2. 关于mysqld不是有效的win32程序
http://www.cnblogs.com/xiaobin-hlj80/p/5500152.html
3. 安装boost库(Windows)
http://www.cnblogs.com/xiaobin-hlj80/p/5503842.html
标签:
原文地址:http://www.cnblogs.com/xiaobin-hlj80/p/5505831.html