简体   繁体   中英

Subversion Build: fatal error LNK1181: cannot open input file 'zlib.lib'

I am trying to build Subversion from source code. I am done Configuring subversion using this command.

   C:\SVN\src-trunk>gen-make.py -t vcproj --vsnet-version=2008 --with-berkeley-db=C
    :\SVN\bdb --with-httpd=C:\SVN\httpd-2.2.16 --with-neon=C:\SVN\Neon --with-serf=C
    :\SVN\serf --with-sqlite=C:\SVN\sqlite\sqlite-amalgamation-3080402 --with-zlib=C
    :\SVN\zlib --with-openssl=C:\SVN\openssl-0.9.8s

This command has created a subversion_vcnet.sln also. Now i am trying to build this sln project using this command.

   C:\SVN\src-trunk>msbuild subversion_vcnet.sln /t:__ALL_TESTS__ /p:Configuration=
   Release

This command gives me following error:

   LINK : fatal error LNK1181: cannot open input file 'zlib.lib'

How to solve this error?

You're building Subversion and you're building it on Windows? You're a brave, brave man.

Subversion has a whole boatload of dependencies and many of those dependencies need to be set to particular revisions. It looks like zlib is not installed.

However, what you'll quickly discover is that you have to build Apache from scratch in order to get the Subversion Apache DAV plugins to work. You'll also need the Apache Runtime Library and Neon. (I understand that the most recent version of Subversion eliminated some of these dependencies, but I can't remember which).

I use to build Subversion on Linux which is way easier than Windows because Linux already has most of the dependencies such as Zlib installed, but it would take a whole day -- if I was lucky . I could spend a week tweaking things back and forth.

I would highly recommend to use one of the many pre-built Subversion/Apache packages for Windows. There's VisualSVN , There's Wandisco , and there's ColabNet's SubversionEdge . VisualSVN gives you a GUI front end for setting up repos and configuring Apache, but the configuration is limited. In the free version, you can't use ActiveDirectory. However, if you're up to rolling your own, you probably don't need some GUI doing things for you. In that case, I'd use SubversionEdge. It'll give you the precompiled Apache and Subversion that will definitely work together.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM