Building LibreOffice on Windows with Cygwin and MSVC: Historical Notes

    From The Document Foundation Wiki

    This is historical record only, for current releases see Editing Development/BuildingOnWindows

    Building older release branches

    While libreoffice-4-5, libreoffice-5-2 and libreoffice-5-3 release branches require Visual Studio 2013, you can build older release branches with older Visual Studio versions too.

    Installing Visual Studio 2013

    To build LibreOffice libreoffice-4-5, libreoffice-5-2 and libreoffice-5-3.

    Note pin.svg

    You need to install "Update 5" for Visual Studio 2013, or the build will fail with an internal compiler error in boost.

    Installing Visual Studio 2012

    Only for LibreOffice versions newer than 4.0:

    Visual Studio 2012 comes with the Windows SDK and DirectX SDK and .NET stuff included. Install Visual Studio 2012 and you have all you need.

    If you want your builds to run on Windows XP, you need to install VS 2012 update 1 (or later, current as of this writing is update 3) and use --with-windows-sdk=7.1A

    Installing Visual Studio 2010

    As Visual Studio 2010 doesn't come with all necessary files included, you need to install some additional packages.

    Optional packages

    If you want to build mozilla from source (doesn't apply to master/current codeline), you need the

    Install GNU make

    Warning: The native Win32 GNU make only works to build the master branch leading up to the 4.4 release; for building release branches for 4.3 and earlier, you need a Cygwin GNU make from here.

    Visual Studio 2010 compiler

    Note: It is not possible to build current LibreOffice with Visual Studio 2010; the last release branch that builds with 2010 is libreoffice-4-3 for the 4.3.x releases.

    As of 31.10.2012 it is working on Windows Server 2008 64 bit (current master). If you get this configuration error "checking string.h... no" string not found, that's mean that you don't have any C-HEADER in your <install_visual_studio_dir>\VC\include directory. To resolve, you have to reinstal VS 2010 and check your registry as it says here: and here

    Visual Studio 2008 compiler

    Note: It is not possible to build current LibreOffice with Visual Studio 2008; the last release branch that builds with 2008 is libreoffice-4-0 for the 4.0.x releases.

    If you use Windows SDK 7+ with VS2008 Express, you should register it after install. You should do it with Start>Programs>Microsoft Windows SDK v7.1>Visual Studio Registration>Windows SDK Configuration Tool. If this does not work, open the SDK console (one step up), and execute: WindowsSdkVer.exe -version:v7.1 -legacy (Thanks to Chromium build instructions).

    Optional requirements to build Mozilla Address Book connector

    Building the bundled mozilla from source is not possible currently. When you want to use precompiled mozilla, for example because you want to enable the old mozilla addressbook connector (with --enable-win-mozab-driver), you need the Visual C++ 2005 runtimes in the external-tarball folder.

    Perhaps you find these files already on your PC, because another application has installed them. Look into a subfolder of Windows\winsxs which name starts with x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b.

    Another way is to use the 'Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)', last seen at this location. Unfortunately it does not deliver the file MICROSOFT.VC80.CRT.manifest. But this is a pure text file and you can write it using your editor. Use DOS line ends and UTF-8. For me the following content works, although it might not be "correct". I took the version number from the files. Put all those files into external\tarballs. (This location provides latest VC++ runtimes, including 2005, and the version of vcredist 2005 indicated there seems to contain proper manifest.)

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
        <file name="msvcr80.dll"/>
        <file name="msvcp80.dll"/>
        <file name="msvcm80.dll"/>