thrift c++ win8 vs2013 环境搭建

thrift库依赖于openssl、boost和libeventapache

库源码下载:编程

openssl
windows

http://www.openssl.org/source/openssl-1.0.2-latest.tar.gz 工具

boostui

http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.zip/download spa

thrift
.net

http://www.apache.org/dyn/closer.cgi?path=/thrift/0.9.2/thrift-0.9.2.tar.gz命令行

libeventorm

https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz blog


工具下载:

thrift.exe  

    下载路径: http://www.apache.org/dyn/closer.cgi?path=/thrift/0.9.2/thrift-0.9.2.exe 

    下载完之后放到某个路径下,把这个路径添加到系统环境变量Path里。

ActivePerl.msi  

    下载路径:http://www.activestate.com/activeperl/downloads/thank-you?dl=http://downloads.activestate.com/ActivePerl/releases/5.20.1.2000/ActivePerl-5.20.1.2000-MSWin32-x64-298557.msi

    安装好之后把安装路径下的bin和lib的完整路径添加到系统环境变量Path里。

visual studio 2013

    随便找个破解版

windows sdk 8.1     

    sdksetup.exe下载地址:https://www.microsoft.com/click/services/Redirect2.ashx?CR_EAC=300135395

    下载完成双击运行,在有复选框的那一步选择第二项下载离线安装包,离线包的安装彷佛比较麻烦,我没找到别的帖子里讲的sestup.exe,能安装的文件挨个点,稀里糊涂就装完了,下载离线包的时候最好本身建立一个文件夹,指定到那里,都下载到一块儿。


编译安装openssl

    安装nasm,把nasm.exe的安装路径添加到系统环境变量Path里

    nasm下载路径:http://www.nasm.us/pub/nasm/releasebuilds/2.11.08/win32/nasm-2.11.08-installer.exe

    解压缩openssl代码,里面有安装说明文件INSTALL.W32 INSTALL.W64,我选了32位的

    里面提供了3种编译途径:

          * Visual C++

          * Borland C

          * GNU C (Cygwin or MinGW)

    我用第一种,用vc的命令行工具,TOOLS->Visual Studio Command Prompt,用系统默认提供的cmd须要配置vc的各类环境变量,仍是vc的方便。

    编译命令:

        perl Configure VC-WIN32 --prefix=D:\openssl (安装路径不要有空格,也不要用双引号包围路径, 对windows编程环境不熟悉,我选择这样简单的作法)

        ms\do_nasm

        nmake -f ms\ntdll.mak

        nmake -f ms\ntdll.mak test

        nmake -f ms\ntdll.mak install


编译安装libevent 

    参考连接:http://blog.csdn.net/xufeng0991/article/details/44134005 讲的很清除。

    编译好之后把生成的库所在文件夹的路径加添加到系统环境变量Path里。


编译boost

    网上搜吧,以前就编译过了,有时间再来补充。


编译thrift

    在thrift-0.9.2\lib\cpp下打开thrift.sln编译解决方案,作好以上,libthrift.lib libthriftnb.lib能够一次编过

相关文章
相关标签/搜索