Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 1.6 KB

windows_build.md

File metadata and controls

36 lines (29 loc) · 1.6 KB

Building libcouchbase on Windows

NOTE:: we are currently not supporting 32bit Windows installations

  1. Install Python 2.7 x64
  2. Install cmake
  3. Install OpenSSL x64 Dev
  4. Install git
  5. git clone https://github.com/libuv/libuv.git
  6. Add libuv, openssl, cmake and python to Path ENV VAR
  7. Install Build Tools for Visual Studio 2017
    • Windows 10 SDK
    • Visual C++ tools for cmake
    • C++/CLI support
  8. Build libuv (or use gem install libuv to automate)
    • git clone https://chromium.googlesource.com/external/gyp build/gyp
    • vcbuild.bat vs2017 shared debug x64 -- libcouchbase looks for a debug build
    • vcbuild.bat vs2017 shared release x64
  9. git clone https://github.com/couchbase/libcouchbase.git
    • mkdir lcb-build
    • cd lcb-build
    • cmake -G "Visual Studio 15 Win64" ..\libcouchbase (should include libuv + openssl)
    • cmake --build .

Seems to also support: https://github.com/google/snappy

  • mkdir snappybuild && cd snappybuild && cmake -G "Visual Studio 15 Win64" ..\snappy
  • I couldn't work out how to have libcouchbase include this in the build.

I also had to modify plugin-libuv.c before this would compile on Windows

  • Installed the Visual Studio GUI using VS Installer
  • #include "libcouchbase\plugins\io\bsdio-inl.c"
  • The linker has some dependencies that need to be removed such as: OPTIMIZED.lib

A pre-compiled version of libcouchbase.dll is shipped with the GEM