如何使用visual Studio 2010编译和构建librsync? [英] How to compile and build librsync using visual Studio 2010?

查看:628
本文介绍了如何使用visual Studio 2010编译和构建librsync?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要一个rsync库。我遇到了一个名为librsync的东西,并从这个链接

We have a requirement where we need some rsync library.I came across something named as librsync and downloaded it from this Link

在此库的自述文件中提及

In the readme file of this library its mentioned


PCbuild目录包含一个项目和预生成的配置
文件,用于MSVC ++ IDE。这应该足够编译
rdiff.exe而不需要cygwin。

The PCbuild directory contains a project and pre-generated config files for use with the MSVC++ IDE. This should be enough to compile rdiff.exe without requiring cygwin.

但是当我在MSVC ++ IDE中打开它,它,它给了我超过36个编译时错误。我想我做错了或错过一些重要的步骤来做。

But when I opened it in MSVC++ IDE and built it,it gave me more than 36 compile time errors.I guess I'm doing something wrong or missing some important steps to do it.

我使用MS Visual Studio

I am using MS Visual Studio 2010 premium on windows 7 PC.

请帮助,如果这里的任何人已成功运行这个项目库使用visual studio 2010。

Please help in case anyone here has successfully ran this project library using visual studio 2010.

推荐答案

使用VS2010打开 .dsw VC ++ 6工作区文件并使用自动项目转换后,以便进行编译:

After opening the .dsw VC++ 6 workspace file with VS2010 and using the automatic project conversion, I had to make the following minimal changes to get it to compile:


  • 添加了 #define inline __inline PCbuild\config.h 的底部。 VS2010不支持C的 inline 关键字,但有 __ inline

  • 已将 HAVE_CONFIG_H 添加到 rdiff 项目属性,C / C ++,预处理器,预处理器定义。否则,在某些情况下,项目没有使用预构建的PCbuild\config.h。右键单击 rdiff 项目,选择属性并在以下对话框中进行更改:

  • Added #define inline __inline to the bottom of PCbuild\config.h. VS2010 doesn't support the inline keyword for C, but does have __inline.
  • Added HAVE_CONFIG_H to rdiff Project Properties, C/C++, Preprocessor, Preprocessor Definitions. Otherwise, the project wasn't using the pre-built PCbuild\config.h in some cases. Right-click the rdiff project, select Properties and make the changes in the dialog below:

添加了 rollsum.c rdiff 源文件列表。

Added rollsum.c to the rdiff Source Files list. Not sure why this got dropped from the conversion, but it was needed to compile.

还有72个警告,我没有测试结果,但这应该可以帮助你开始。

There were still 72 warnings, and I didn't test the result, but that should help you get started.

这篇关于如何使用visual Studio 2010编译和构建librsync?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆