如何使用visual Studio 2010编译和构建librsync? [英] How to compile and build librsync using visual Studio 2010?
问题描述
我们需要一个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 ofPCbuild\config.h
. VS2010 doesn't support theinline
keyword for C, but does have__inline
. Added
HAVE_CONFIG_H
tordiff
Project Properties, C/C++, Preprocessor, Preprocessor Definitions. Otherwise, the project wasn't using the pre-built PCbuild\config.h in some cases. Right-click therdiff
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屋!