Before you start

prj (Created folder)

- svn (Subversion)

- zlib

- apr

- apr-util

- xml (apr-util has this folder)

- expat

- sqlite

- serf (Created folder)

- openssl

- serf

- scons

- nasm

- svn-win32-libintl

- gettext

1. zlib

  • Open Visual Studio Solution file 'zlib/contrib/vstudio/vc14/zlibvc.sln'.
  • On the toolbar, choose ReleaseWithoutAsm from the Solution Configurations list box.
    (Asm version does not work correctly.)
  • Select zlibstat project and open project properties (Below is needed to work with subversion.)
    • C++ -> Preprocessor -> Preprocessor Definitions : Remove ZLIB_WINAPI;
    • C++ -> Code Generation -> Runtime Library : Set to Multi-threaded DLL (/MD)
  • Build zlibstat project. This will create 'zlibstat.lib'
  • Move 'zlibstat.lib' from 'zlib/contrib/vstudio/vc14/x86/ZlibStatReleaseWithoutAsm' to 'zlib/' for later use.

2. expat

  • Extract 'expat' folder in source to 'apr-util/xml/expat/'
  • Open 'apr-util/xml/expat/expat.sln'.
  • On the toolbar, choose Release from the Solution Configurations list box.
  • Select expat project and open project properties
    • General -> Windows SDK Version : Set to <inherit from parent or project defaults> or Installed SDK version
    • C++ -> Code Generation -> Runtime Library : Set to Multi-threaded DLL (/MD)
    • Linker -> General -> Output File : Set to .\LibR\libexpat.dll
    • Linker -> Advanced -> Import Library : Set to .\LibR\libexpat.lib
  • Build expat project. This will create 'libexpat.dll' and libexpat.lib'

3. apr, apr-util, apr-iconv

  • Open 'apr-util/aprutil.dsw'.
  • On the toolbar, choose Release from the Solution Configurations list box.
  • View -> Other Windows -> Property Manager
    • Right click libaprutil -> Add New Project Property Sheet... -> Add
    • Expand 'libaprutil' tree view -> Release | Win32 -> PropertySheet
      • User Macros -> Add Macro
        • Name : XML_PARSER
        • Value : .\xml\expat\lib\LibR\libexpat
  • Build libapr and libaprutil project

4. openssl

  • Open 'Developer command prompt for vs2017'.
  • Go to 'prj/serf/openssl' (In my case, Z:\prj\serf\openssl)
    cd prj\serf\openssl
  • Add nasm folder to path
    PATH=%PATH%;Z:\prj\serf\nasm
  • Modify 'openssl/Configurations/10-main.conf'

    (Line 1299) "/MT /Zl"
             =>  "/MD /Zl"

    (Line 1312) "/MT"
             =>  "/MD"
  • Configure

    perl Configure zlib --with-zlib-include=../../zlib --with-zlib-lib=../../zlib/zlibstat.lib no-shared enable-capieng VC-WIN32
  • Build
    nmake
  • Move 'libcrypto.lib', 'libssl.lib' from 'serf/openssl' to 'serf/openssl/lib/' for later use.

4. serf

  • Open 'Developer command prompt for vs2017'.
  • Go to 'prj/serf/serf' (In my case, Z:\prj\serf\serf)
    cd prj\serf\serf
  • Modify 'serf/SConstruct'

    (Line 143) allowed_values=('14.0', '12.0',
             => allowed_values=('14.1', '14.0', '12.0',

    (Line 329) 'zlib.lib'
             => 'zlibstat.lib'

    (Line 338) ['libeay32.lib', 'ssleay32.lib']
             => ['libcrypto.lib', 'libssl.lib']

    (Line 346) '$OPENSSL/inc32'
             => '$OPENSSL/include'

    (Line 347) '$OPENSSL/out32dll'
             => '$OPENSSL/lib'
  • Configure & Build

    ..\scons\scons.py APR=../../apr APU=../../apr-util OPENSSL=../openssl/ ZLIB=../../zlib LINKFLAGS=/SAFESEH MSVC_VERSION=14.1

5. Subversion

  • Open 'Developer command prompt for vs2017'.
  • Go to 'prj/svn' (In my case, Z:\prj\svn)
    cd prj\svn
  • Add gettext folder to path
    PATH=%PATH%;Z:\prj\gettext\bin
  • Modify 'svn/build.cfg'. Add following line in [libsvn_ra_serf] section

    msvc-libs = Crypt32.lib
  • Modify 'svn-win32-libintl/inc/libintl.h'. Add following line at the top of the file

    #define LIBINTL_VERSION 0x00000e01
  • Copy 'prj/svn-win32-libintl/' to 'prj/svn/build/win32' (Subversion's build script cannot find this library correctly)
  • Configure
    gen-make.py --vsnet-version=2017 --with-apr=..\apr --with-apr-util=..\apr-util --with-apr-iconv=..\apr-iconv --with-zlib=..\zlib --with-sql=..\sqlite --with-libintl=..\svn-win32-libintl --with-serf=../serf/serf --with-openssl=../serf/openssl --with-static-openssl
  • Build

    msbuild subversion_vcnet.sln /t:__MORE__ /p:Configuration=Release


+ Recent posts