My C++ extension does not work with LO4 anymore

Michael Stahl mstahl at
Thu Oct 31 15:58:25 CET 2013

On 31/10/13 14:44, Christophe Devalland wrote:
> 2013/10/31 Stephan Bergmann <sbergman at
> <mailto:sbergman at>>
>     That's a consequence of
>     <>
>     "Base-line Windows / C++ compiler upgraded to Visual Studio 2010
>     [...] runtime libraries for Visual Studio 2008 (msvcr90.dll) are no
>     longer bundled."
> Yes, but I provide this dll in my extension.
>     Short of recompiling your extension against the LO 4 baseline,
>     another option might be to tell users of your extension to first
>     download and install the old MS runtime libraries on their system
>     (which are available from MS, IIUC).
> I tried to install MS runtime libraires
> (
> <>) but the
> problem still occurs (uno.exe reports runtime error).
> On the same computer my extension works fine with AOO4.
> The only issue is to recompile ?

IIRC with MSVC 2008 it is required that the DLL/EXE using the MSVCRT
DLLs needs to embed some crazy XML manifest, because the 2008 MSVCRT
DLLs are installed in some non-default location, not in the usual search
paths; this is different with MSVC 2010/2012 where the redistributatble
installs the DLLs into a default search path.

relevant bits in the LO build system are:

- passing "-manifestfile:mydll.manifest" to the link.exe so it writes
  the manifest to the file
- "mt.exe $(MTFLAGS) -nologo -manifest mydll.manifest
  -outputresource:mydll.dll\;2" to get the manifest file into the DLL

... and if you want to know why that is so ridiculously complicated (why
can't link.exe just put in the manifest into the DLL itself) you have to
use Microsoft.  or speaking of that, why do applications need to bundle
the libc in the first place...

i hope with the above info it should be possible to get a DLL that loads
with the user installed 2008 redistributable.  or you can rebuild it
with 2010 compiler.

More information about the LibreOffice mailing list