How do I compile and build librsync using Visual Studio 2010?

We have a requirement when we need the rsync library. I came across something called librsync and downloaded it from this Link

The readme of this library mentioned

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

But when I opened it in MSVC ++ IDE and built it, it gave me over 36 compile time errors. I think I am doing something wrong or missing some important steps for this.

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

Please help if anyone here has successfully run this project library with visual studio 2010.


source to share

1 answer

After opening a .dsw

VC ++ 6 workspace file with VS2010 and using automatic project conversion, I had to make the following minimal changes in order to compile it:

  • Added #define inline __inline

    to the end PCbuild\config.h

    . VS2010 doesn't support the inline

    C keyword , but it does __inline


    to rdiff

    Project Properties, C / C ++, Preprocessor, Preprocessor Definitions. Otherwise, the project did not use the pre-generated PCbuild \ config.h file in some cases. Right click on the project rdiff

    , select Properties and make changes in the dialog below:

    rdiff Property Pages dialog

  • Added rollsum.c

    to the list of source files rdiff

    . Not sure why this was removed from the conversion, but it was necessary for compilation.

There were 72 more warnings and I haven't tested the result, but this should get you started.



All Articles