vs2008编译FileZilla服务端源码

vs2008编译FileZilla服务端源码

  FileZilla服务端下载地址:https://download.filezilla-project.org/server/。FileZilla服务端源码和服务端程序在一个exe内,安装时选择source code将源码安装到指定目录。

  打开source文件夹,里面有FileZilla server.sln解决方案和vc工程。我的开发环境是vs2008,而最新版的FileZilla server是用vs2013编的,无法用vs2008打开。因此,我使用了vs2008能打开的版本0_9_34。

  FileZilla Server包含两个工程,interface和service。顾名思义,界面和服务。如下图所示:

  VS2008编译interface,报错误“1>..\iputils.cpp(21) : fatal error C1083: Cannot open include file: 'boost/regex.hpp': No such file or directory”,缺少boost库regex文件调用。下载boost库1.62.0,下载地址为:http://nchc.dl.sourceforge.net/project/boost/boost/1.62.0/boost_1_62_0.7z。解压后运行bootstrap.bat,生成bjam.exe。用vs2008自带的Visual Studio 2008 Command Prompt打开bjam.exe。直接运行也可以,但直接运行boost会使用默认的IDE环境变量来编译。比如说电脑上同时安装vs2008和2010,那boost生成的lib和dll对应着vc100的lib和dll,vs2008不能使用。指定使用Visual Studio 2008 Command Prompt打开bjam.exe,确保生成vc90的lib和dll,能让vs2008使用。

  还会提示一个错误“fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory”,找不到zlib.h文件。下载zlib库,地址:http://www.winimage.com/zLibDll/zlib123.zip。解压,编译生成dll debug和dll release的lib和dll。

  工程属性配置boost和zlib,将头文件和lib加入工程属性。将service工程的zlibd.lib改名成zlib1d.lib或zlib1.lib。

  配置完成,编译通过。 

posted on 2016-12-13 12:00  炽离  阅读(729)  评论(0编辑  收藏  举报

导航