LO Windows SDK - Compiler error: Unkown Platform

Fatih Yegin mail.fyegin at gmail.com
Tue Jul 26 12:52:34 UTC 2022


Hello,

I am experimenting with LO SDK and using cmake to compile according to
this page:
https://dev.blog.documentfoundation.org/2022/04/19/using-cmake-to-build-libreoffice-cpp-sdk-examples/

This works great on Linux.

However, I am having build errors on Windows.

I believe, root cause of this problem is unkown platform error from sal
library. Yet, I can't solve this even though I explicitly specify the
OS within compile commands.

I have added these errors briefly on the attachements in
Build_errors.txt with the addition of CMakeLists.txt file and
compile_commands.json file.

For the build environment, I use MSYS's MINGW64 environment (additional
info can be found at: https://www.msys2.org/docs/environments/).

I can share my configuration steps with a secondary e-mail if needed.

Thank you.

Best Regards,
Fatih Yeğin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: compile_commands.json
Type: application/json
Size: 400 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20220726/156cb600/attachment.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeLists.txt
Type: text/x-cmake
Size: 3013 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20220726/156cb600/attachment.bin>
-------------- next part --------------
In file included from C:/LibreOffice/sdk/include/rtl/textenc.h:27,
                 from C:/LibreOffice/sdk/include/rtl/string.hxx:43,
                 from C:\Users\VBox\Desktop\experiments\experiment.cpp:4:
C:/LibreOffice/sdk/include/sal/types.h:250:5: error: #error ("unknown platform")
  250 | #   error("unknown platform")
      |     ^~~~~
In file included from C:/LibreOffice/sdk/include/osl/interlck.h:29,
                 from C:/LibreOffice/sdk/include/rtl/string.h:29,
                 from C:/LibreOffice/sdk/include/rtl/string.hxx:44:
C:/LibreOffice/sdk/include/sal/saldllapi.h:34:23: error: 'SAL_DLLPUBLIC_IMPORT' does not name a type; did you mean 'SAL_DLLPUBLIC'?
   34 | #define SAL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
      |                       ^~~~~~~~~~~~~~~~~~~~

[And goes on...]


More information about the LibreOffice mailing list