0

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

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.

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.

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

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

poolie
  • 9,289
  • 1
  • 47
  • 74
Abhinav
  • 1,720
  • 4
  • 21
  • 33
  • 1
    The project files in `PCbuild` are for VC++ 6...a rather old version. You'll have to port the build to VS 2010. – Mark Tolonen Nov 25 '13 at 08:05
  • could you elaborate wht u mean by porting to VS2010?? i rem VS 2010 asking to change the project to current version when I opened PCbuild..i clicked yes there... is it the same?? – Abhinav Nov 25 '13 at 08:12
  • 1
    The newer Microsoft compilers are more compliant and detect more warnings and errors than that old compiler. You'll have to fix any new warnings or errors yourself. – Mark Tolonen Nov 25 '13 at 08:15

1 Answers1

2

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:

  • 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:

    rdiff Property Pages dialog

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

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

Mark Tolonen
  • 166,664
  • 26
  • 169
  • 251
  • i m new to Visual Studio so could you give some link for doing the second step please...also i feel u missed to mention the inclusion of `popt.h` – Abhinav Nov 25 '13 at 09:51
  • 1
    @Abhinav, as for `popt.h`, the above changes are the *minimum* to get rdiff to compile. I'm not doing all your work for you :) Intellisense "errors" don't necessarily prevent the build from working. – Mark Tolonen Nov 25 '13 at 20:28
  • nywz i already added `popt.h` :)...jst thought to mention it as i felt it makes ur answer complete...i will take it from here..thnx :) – Abhinav Nov 26 '13 at 05:32
  • After resolving these, I get 4 link errors first of which is `error LNK2019: unresolved external symbol _blake2b_final referenced in function _rs_calc_blake2_sum`They are all similar..any ideas? I am using VS2010. – zar Jun 09 '15 at 20:15