码迷,mamicode.com
首页 > 数据库 > 详细

在windows编译MariaDB

时间:2016-05-18 17:25:09      阅读:734      评论:0      收藏:0      [点我收藏+]

标签:

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>
View Code

(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

 

在windows编译MariaDB

标签:

原文地址:http://www.cnblogs.com/xiaobin-hlj80/p/5505831.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!