!link warning - unable to install extension

Getting error message when trying to install example extension GitHub - luane-aquino/helloworld-libreoffice-extension: Hello World LibreOffice extension for LibreOffice Calc

Снимок

Version: 7.4.0.3 (x64) / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

UPD:

New details about installation
I was able to install the extension using command line

C:\Program Files\LibreOffice\program>unopkg add -v -s path\to\helloworld.oxt
Copying: helloworld.oxt

unopkg done.

The extension appears as enabled in Extension Manager and works, but if I disable it by pressing Disable I get the same error message and line about extension unknown status. Nevertheless after that I can enable it successfully again by hitting Enable, while it is impossible if I try to do the same after adding extension via Extension Manager GUI

Снимок2

UPD 2:

The above solution does not work if Calc is running when executing unopkg

In this case I get different output

C:\Program Files\LibreOffice\program>unopkg add -v -s path\to\helloworld.oxt
Raising process: file:///C:/Program%20Files/LibreOffice/program/soffice
Arguments: --nologo --nodefault --accept=pipe,name=edcffa22cf61d7fa1fd96aca377e1b643d25cc7ba5dbd9f856cade4c984f33;urp;
OK.  Connecting...OK.
ERROR: Exception occurred: An error occurred while enabling: HelloWorldLibrary

    Cause: (com.sun.star.lang.IllegalArgumentException) { { { Message = "!link", Context = (com.sun.star.uno.XInterface) @239b4e632c8 (ImplementationName = "com.sun.star.comp.sfx2.ScriptLibraryContainer") } }, ArgumentPosition = (short) 1 }

ERROR: unopkg failed.

Hallo
the whole thing is simply: »print "hello World"« blown up into an extension.

throw it away!!

I try to use this example just to start my own extension, do you have better examples to start with? I’d like to understand why this error occurs and what it actually means

In case of clumpsy basic, all you need is:
Move the stuff into a Library (not called Standard) and export that library as …oxt

I tried this and got the same error, btw please see my updated question

I know this has been a couple of years but I’ve just experienced this exact problem with the same demo/example extension on the latest LibreOffice so posting my solution.

After much trial and error the only thing that seemed to work for me (and I’m not sure which of these is the actual fix but I suspect it is number 2).

  1. Renaming the macro from the default “Main” to (in my case) HelloWorldMacro and making sure this is the same in the Addons.xcu file (i.e., in the line …vnd.sun.star.script:HelloWorldLibrary.Module1.HelloWorldMacro?language=Basic…)
  2. Deleting the macro library HelloWorldLibrary from LibreOffice before trying to install the extension

I suspect if you just download the example from github and then customise/develop from there you wont experience this but if you do like I did and try to follow the guide it makes no mention of having to delete the macro library.