From Apache OpenOffice Wiki
Jump to: navigation, search
Documentation caution.png This page is moved into the Building Guide. Please make sure to add new information there and make this page a redirect if it only contains duplicate information.

Welcome to OOo development for Windows

This is an initial attempt to fill out information for building on Windows. If it ends up being complete, this notice can be removed! At the moment you'll have to piece together information from other pages with the changes here for doing it on Windows.

Most of this wiki assumes that you'll be using a reasonably current Linux system, as a time saving feature. While real hackers prefer Free software, if you're forced to build stuff for Windows, this is the place to be.

Development Tools

Different compilers that can or can not be used to build are documented below. The official way is Visual C++ .NET 2003 for all code 2.x code branches and Visual C++ .NET 2005 (including the "Express" version) for the dev300 code line.

Visual Studio .NET 2003 Professional

The C++ compiler included in Visual Studio .NET 2003 is the official one used to build When installing, unless you need them otherwise, there is no need to install the Visual Basic, C#, J#, or .NET 1.1 SDK components.

Visual Studio .NET 2003 Standard (approx $100 price)

NB: These fixes have been rolled into more recent milestones, so you should now be able to happily build using standard. This is a tag to remove these notes and the page at some future point. --KaiB 13:14, 1 June 2006 (CEST)

You can use the Standard version of Visual Studio to build OpenOffice but there are certain workarounds needed. The problem is that OO.o enables /O flags in Professional that conveniently cripples the compiler enough to hide some ugly hacks and bugs that have crept in over the years. Standard does not support optimizations so suddenly these beasts get out in the open. See BuildingMSVCStandard

For how to tune the MS IDE into coding OOo efficiently, see this page.

Visual Studio 2008

The compiler has been released in November 2007.

* Visual C++ 2008 Express Compiler
* or alternatively, the Standard or better version of VS 2008
* Windows Server 2008 SDK 6.0.6001.18000.367-KRMSDK_EN.iso (06. March 2008) 
* Framework SDK 3.5 full package 
* Platform SDK Redistributable: Dbghelp.dll 
* apache-ant-1.6.5 
* prebuild mozilla
* msvcr71.dll, msvcp71.dll 
* Microsoft_VC90_CRT_x86.msm, Microsoft_VC90_DebugCRT_x86.msm,
  policy_9_0_Microsoft_VC90_CRT_x86.msm, policy_9_0_Microsoft_VC90_DebugCRT_x86.msm
  You can find these files in your directory c:\program files\common files\merge modules
The environment variable WINDOWS_VISTA_PSDK=TRUE needs to be set.

Currently OOo isn't completely buildable with Visual Studio 2008 Express and Windows Server 2008 SDK due to missing ATL header / libs (these used to be shipped with the 2003 SDK, but the 2003 SDK cannot be used with VS2008). Setting DISABLE_ATL=TRUE after the configure step helps for building but disables Windows (not internal) OLE completely and some other functionality.

The settings for --with-psdk-home are case sensitive!

./configure --disable-build-mozilla --disable-activex --with-win32
--with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC"
--with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin"
--with-frame-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"
--with-asm-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/Bin"
--with-jdk-home="/cygdrive/c/j2sdk1.4.2_11" .
--disable-directx --disable-epm
--with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"

Configure changes have been made now (CWS vq41), available with milestone DEV300_m6

If you run into problems, check your settings in for WINDOWS_VISTA_PSDK, DISABLE_ATL, DISABLE_ACTIVEX
all have to be set 'TRUE' 

Note that jdk-1.6 works if you don't want to use 1.4.2. Apache-ant-1.7.1 also works. Visual Studio Express 2008 with SP1 also works.

Visual Studio 2005 Professional

The necessary changes for configure haven't been made, yet. It may help to set the environment variable PROF_EDITION=TRUE by hand. When using the Vista SDK Windows#Building_with_Windows_Vista_SDK setting the environment variable WINDOWS_VISTA_PSDK=TRUE will help.

The --disable-activex switch in the configure step is not needed for the Professional Edition. The other steps should be the same as described in the section for the Express compiler, but it hasn't been tested.

Visual C++ 2005 Express

Visual C++ 2005 Express the FREE (as in free beer) Microsoft compiler is now supported for Windows builds. So, the great news is it's possible to build with a free Microsoft tool-chain. See steps for using this compiler in the Windows#Using ooo-build section below. In fact I would guess the config options below will probably work for a vanilla build also ( maybe someone will try that and add any extra info/steps here ).


MinGW is gcc and GNU binutils targeted for Windows, producing plain Win32 executables. No POSIX emulation layer as Cygwin is involved. Using the Cygwin compiler with the -mno-cygwin switch in theory does the same, but unless one is very careful it is easy to get into a mess when using a Cygwin environment to build pure Win32 binaries.

MinGW is not supported for building at the moment.

Information about work to build with MinGW is at issue 24588 ; however this mostly deals with 1.1 at the moment.

Information about work to build 2 with MingGW is at issue 53572, issue 71986, issue 82653, issue 83133

Using vanilla source

While ooo-build has once been developed to make building OOo less painful, you might also try to start out with the standard source code as it is pretty straightforward to use nowadays. After you download and unpack a vanilla ooo source tarball, running "configure" in the directory "config_office" will gladly complain about missing build-dependencies. The remaining build process is described in the document Building Guide

Using ooo-build

These are addenda to using ooo-build with the following command line:

 ./configure --with-win32

ooo-build should pick up all the other requirements for you automatically (reading them out of the registry)

Extra requirements

Here are some issues that require attention when building using ooo-build, and details not mentioned in the Building under Windows with tcsh page:

  • It is unclear whether using a ooo-build tarball will work. At least at some stage it didn't. Building from a checkout from (anonymous) SVN is known to work. You will then have to run
  • For some reason needs to be run through dos2unix, but none of the other shell scripts involved require this treatment.
  • You should install also the Cygwin autoconf, automake, cabextract, diffutils, patchutils, pkg-config and wget packages
  • You need to install the Perl module Archive::Zip using cpan. Just give the command "cpan", hit Enter to all questions, select the appropriate CPAN mirrors for your region, and give cpan the command "install Archive::Zip". Note: cpan will tell you that it is not up-to-date, and tell you how to upgrade itself, that is the Bundle::CPAN module. Please don't attempt to do that. It will bring in updates to a shitload of dependent Perl modules, try to build and install them, too, but the process will eventually fail miserably and you will end up with a non-working mess.
  • The configure requires make version 3.80 in Cygwin. You must use that instead of the make 3.81 that Cygwin offers currently. For your convenience, there is a copy of make.exe here: [1].
  • Some modules need gperf.exe, download from [[2]] and put gperf.exe into one of our PATH directories.

ooo-build with Visual C++ 2005 Express

The following steps were performed on a clean machine ( Win XP ) with no dev tools installed on it.

first review the information above

bits you need and where to get them ( as of Mon 6-Nov-2006 )

  • apache-ant-1.6.5 ( afaik this actually isn't needed for ooo-build but I autopiloted it in the configure, wont do any harm )

nice hints hints from Volker re. the config flags

Note: in the configure flags shown below DirectX is disabled ( sorry at this point I was still waiting for it to download )

You need to copy msvcp80.dll and msvcr80.dll into your $SRCDIR/external/msvcp80 dir in my case I found those libraries in


had to downgrade the gnu make version from 3.81 to 3.80 ( apparently for building mozilla, but mozilla build failed anyway for me, I haven't had time yet to investigate further )

perform the manual header change as described

Here's my configure as an example

 ./configure  --disable-build-mozilla --disable-activex --with-win32 --with-distro=NovellWin32
--with-tag=src680-m190 --with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC"
--with-csc-path="/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727" --with-midl-path="/cygdrive/c/Program 
Files/Microsoft Platform SDK for Windows Server 2003 R2/Bin" --with-frame-home="/cygdrive/c/Program 
Files/Microsoft Platform SDK for Windows Server 2003 R2" --with-ant-home=/cygdrive/c/apache-ant-1.6.5 
--with-jdk-home=/cygdrive/c/j2sdk1.4.2_13 --disable-directx --with-nsis-path="/cygdrive/c/Program Files/NSIS"

compile problems:

  • lpsolve & scsolver didn't build ( these 2 are only relevant for only ooo-build with --with-distro-Novellxxxxx ) lpsolve has a minor problem with includes, in scsolver there are many template errors which I didn't investigate yet.

To disable temporarily either remove the CalcSolver label from the NovellWin32xxx sections in ooo-build/patches/src680/apply file or just use the generic PlainWin32 distro-target ( should work though I haven't tried that )

I got alot of problems with calls to remove where the call to remove includes std namespace. It seems that there is a precendent somewhere and maybe this at one time was known issue I opened this issue for that

I seem to get lots of "/usr/bin/bash: Resource temporarily unavailable" with my version of cygwin

$ uname -a
CYGWIN_NT-5.1 trouble2 1.5.21(0.156/4/2) 2006-07-30 14:21 i686 Cygwin 

the following steps seemed to help or maybe the problem just went away by itself :-(

  • reboot machine
  • switch to tcsh e.g. do a 'tcsh' at the command prompt
  • build from (the source tree)/instsetoo_native directory using the build --all command while in that directory

--Npower 11:42, 10 November 2006 (CET)


The mozilla binary dist is linked against msvcr71.dll,msvcp71.dll. Therefore these librarys needs to be copied into your $SRCDIR/external/msvcp71 directory before doing the configure step. You can get these from an OpenOffice installation set.

Runtime requirement of installation sets

On sytems without an installed msvcr80.dll the vcredist_x86.exe has to be installed once first. This can be free downloaded at Microsoft


Building with Windows Vista SDK

Old Windows Vista SDKs (2007) aren't usable.

Windows SDK V6.1

Use the Windows Server 2008 SDK (6. March 2008) 6.0.6001.18000.367-KRMSDK_EN.iso you can find it here In this version the compiler isn't included anymore, have a look at the Windows#Visual Studio 2008 Express section.

You currently have to set "export WINDOWS_VISTA_PSDK=TRUE" but this will be handled by configure soon. With the .Net 2005/2008 Express Editions you need the additional setting "export DISABLE_ATL=TRUE"


Miscellaneous info

  • csc.exe comes from the c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 directory, you might need --with-csc-path.
  • Beware of using /c/ instead of /cygdrive/c/.
  • Avoid trailing slashes in configure parameters. They sure cause problems for --with-psdk-home.
  • Using some not quite latest cygwin releases (1.5.18/1.5.19) can lead to tcsh freezing in places - the build will appear to hang. You can fix this by running ls /proc/$nnn/fd where $nnn is the number of the process. Or just run
     ls /proc/*/fd

    to "unhang" the process. See issue 51560 for more info...

    Noone so far created a reproducible hang that doesn't require the whole OOo environment, and to make it worse, there are those who cannot reproduce the hang at all ( Works fine here ;) (User:Vq) ). Until someone provides a recipe to reproduce this problem with a small testcase we have to hope that the cygwin developers accidentally fix this problem.

  • With cygwin 1.5.18, makecab.exe hangs when run from the build process (but it works fine when run standalone). So you definitely want to use a snapshot and avoid cygwin 1.5.18, unless you enjoy wasting half a week of your life debugging like I did ...
  • With later Cygwin versions (various 1.5.19 and 1.5.20 snapshots) hangs have been noticed at least by me (User:TorLillqvist) at various stages of the build on a hyperthreading (Pentium 4) machine, while doing the same build using the exact same Cygwin version on a single-processor machine worked fine. So it might be a good idea to turn off hyperthreading.
  • If you get errors like "too long line in ddf file" during the MSI installer build this is caused by too long filenames. Try setting your TEMP/TMP environment variable to something short like "C:\tmp". There is a 255 char line limit for dds files and class names like "InvalidAuthenticationMechanismException" push the envelope. Shaving of 10-15 chars puts us back just under the limit.
  • Avoid using winzip to extract the downloaded source archive. Observed problems include:
    • CR-LF errors that can affect makefiles and cause compile errors
    • Certain files unpacked into root folder, esp. likely when actual path is deeply nested (e.g. foo/bar/source/foo/java/org/x/y/z/w/LongFileName.hmm) which again causes mysterious compile errors.
    Use the tar from Cygwin instead:
     tar xvzf OOo_2.0.2_src.tar.gz
  • If you fail to getting together a working installation of Cygwin, one possibility is to use a known-to-work combination of Cygwin packages, i.e. a direct copy of some other user's Cygwin tree. User:TorLillqvist has such a tree (from late 2006) zipped up at . Don't hesitate to ask for advice if necessary.

See also

Personal tools