My C++ extension does not work with LO4 anymore

classic Classic list List threaded Threaded
4 messages Options
Christophe Devalland Christophe Devalland
Reply | Threaded
Open this post in threaded view
|

My C++ extension does not work with LO4 anymore

Hi,
The problem occurs on LO4 windows (installation or update of my extension with extension manager) :

Runtime Error !
c:\Program Files\LibreOffice 4\URE\bin\uno.exe
R6034
An application has made an attenpt to load the C runtime library incorrectly.

My extension for windows is compiled on MSVC2008. LO is compiled with MSVC 2010, isn't it ? I think that's the problem because it's OK with LO3 and Apache OpenOffice 4.
How to fix that without recompiling my extension ?
Here is my extension : http://cdeval.free.fr/spip.php?article132 (translations available on the top right)
Thanks for any help.


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: My C++ extension does not work with LO4 anymore

On 10/31/2013 10:40 AM, Christophe Devalland wrote:

> The problem occurs on LO4 windows (installation or update of my
> extension with extension manager) :
>
> Runtime Error !
> c:\Program Files\LibreOffice 4\URE\bin\uno.exe
> R6034
> An application has made an attenpt to load the C runtime library
> incorrectly.
>
> My extension for windows is compiled on MSVC2008. LO is compiled with
> MSVC 2010, isn't it ? I think that's the problem because it's OK with
> LO3 and Apache OpenOffice 4.
> How to fix that without recompiling my extension ?
> Here is my extension : http://cdeval.free.fr/spip.php?article132
> (translations available on the top right)

That's a consequence of
<http://www.libreoffice.org/download/4-0-new-features-and-fixes/#C.2B.2B_UNO_language_binding_and_URE_libraries>
"Base-line Windows / C++ compiler upgraded to Visual Studio 2010 [...]
runtime libraries for Visual Studio 2008 (msvcr90.dll) are no longer
bundled."

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).

Stephan
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Christophe Devalland Christophe Devalland
Reply | Threaded
Open this post in threaded view
|

Re: My C++ extension does not work with LO4 anymore

2013/10/31 Stephan Bergmann <[hidden email]>
That's a consequence of <http://www.libreoffice.org/download/4-0-new-features-and-fixes/#C.2B.2B_UNO_language_binding_and_URE_libraries> "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 (http://www.microsoft.com/en-us/download/details.aspx?id=5582) 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 ?


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Michael Stahl-2 Michael Stahl-2
Reply | Threaded
Open this post in threaded view
|

Re: My C++ extension does not work with LO4 anymore

On 31/10/13 14:44, Christophe Devalland wrote:

> 2013/10/31 Stephan Bergmann <[hidden email]
> <mailto:[hidden email]>>
>
>     That's a consequence of
>     <http://www.libreoffice.org/download/4-0-new-features-and-fixes/#C.2B.2B_UNO_language_binding_and_URE_libraries>
>     "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
> (http://www.microsoft.com/en-us/download/details.aspx?id=5582
> <http://www.microsoft.com/en-us/download/details..aspx?id=5582>) 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.


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice