The 64-bit version of LibreOffice 5 cannot load a UNO component on Windows OS. LibreOffice 5 display the following message «cannot get environments». The problem doesn’t appear on the 32 bits version of LibrerOffice 5. My code uses «CPPU_STRINGIFY( msci )» to set the name of the environment.
Created attachment 116419 [details] the error message
How about beta3, does it still have the problem http://dev-builds.libreoffice.org/pre-releases/win/x86_64/ It's about half way through the list, http://dev-builds.libreoffice.org/pre-releases/win/x86_64/LibreOfficeDev_5.0.0.0.beta3_Win_x64.msi
Yes, it occurs with beta 3.
Created attachment 116483 [details] the error message
The problem still there with LibreOffice 5.0.0.4. Is it possible to install an extension with a UNO componant generated with C ++ code in LibreOffice 5 (64-bit)? The problem seems to be that LibreOffice does not recognize the "MSCI" environment. Reference: export function component_getImplementationEnvironment Here tested conguration - Windows 7 (64 bits) - Visual Studio 2013 - LibreOffice 5.0.0.4 (64 bits)
The problem is still there with LibreOffice 5.2.1.2. testdruide's diagnostic is not quite right though. The problem is not that LibreOffice does not recognize msci, rather that msci is not the right value. The right value for windows_x86_64 happens to be mscx. The CPPU_CURRENT_LANGUAGE_BINDING_NAME should the correct value at any time but in the 64 bit sdk for Windows its value is msci instead of the correct mscx. For the time being I have been able to fix my extensions changing the component_getImplementationEnvironment function from this: SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } to this: SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) { #if _WIN64 *ppEnvTypeName = "mscx"; #else *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; #endif }
NEW per comment 6.
My guess is that simply changing the -DCPPU_ENV=msci to -DCPPU_ENV=$(CPPU_ENV) in odk/settings/settings.mk might help
Stephan Bergmann committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3aaa820446f1ad3d3b0ddc557238b6fb3496dd54 tdf#91966: In SDK, set CPPU_ENV=mscx for 64-bit Windows It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Commit Notification from comment #9) > Stephan Bergmann committed a patch related to this issue. > It has been pushed to "master": > > http://cgit.freedesktop.org/libreoffice/core/commit/ > ?id=3aaa820446f1ad3d3b0ddc557238b6fb3496dd54 > > tdf#91966: In SDK, set CPPU_ENV=mscx for 64-bit Windows If someone confirms that that (blind) fix to the SDK's settings/settings.mk actually helps, it can be backported to 5.1.6/5.2.2.
I would be glad to give it a try but I failed to find any build for Windows x64 at http://dev-builds.libreoffice.org/daily/master/. Is that the right place to find daily builds for this platform?
(I have no idea where such master test builds are supposed to show up exactly; hopefully somebody else can give that information. Lacking that, what you could do to check the usefulness of the fix is to manually apply the few-lines change of <https://cgit.freedesktop.org/libreoffice/core/commit/?id=3aaa820446f1ad3d3b0ddc557238b6fb3496dd54> to a settings/settings.mk of an older LO/SDK installation.)
After applying the changes manually as suggested by Stephan CPPU_CURRENT_LANGUAGE_BINDING_NAME has the correct value.
Stephan Bergmann committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f09fd93be5d3c73d94bf67818f067a70b1594c35&h=libreoffice-5-1 tdf#91966: In SDK, set CPPU_ENV=mscx for 64-bit Windows It will be available in 5.1.6. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Stephan Bergmann committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=15cc69ef3b20458889901c0c0ac02c5211a21f48&h=libreoffice-5-2 tdf#91966: In SDK, set CPPU_ENV=mscx for 64-bit Windows It will be available in 5.2.3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Stephan Bergmann committed a patch related to this issue. It has been pushed to "libreoffice-5-2-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9e2f22dfab467b41d552fdaeabf9445c5ad34a47&h=libreoffice-5-2-2 tdf#91966: In SDK, set CPPU_ENV=mscx for 64-bit Windows It will be available in 5.2.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.