Calc Addin Example

Dear LibreOffice Users,

I am looking for an example of how to write a calc add-in for LibreOffice 4.1.5.3.
Unfortunately there comes no example with the LibreOffice SDK that works out of the box, as far as I can see.

But I have come across the following wiki pages
https://wiki.openoffice.org/wiki/SimpleCalcAddIn
https://wiki.openoffice.org/wiki/Calc/Add-In/CompleteAddIn

I then copied the idl and full cpp code from the "CompleteAddin" wiki (see addin.idl and addin.cxx attached), copied and amended the Makefile from the SDK example LibreOffice4.1_SDK/examples/DevelopersGuide/Components/CppComponent (amended version also attached).

When I run "make", then all steps seem to complete, and I get the attached oxt file.
There is no error message when loading it into LibreOffice using the make command.
But when I try to load it by double clicking the file, I get an error message "…CppAddin.uno.dylib: cannot get symbol: component_getImplementationEnvironment- nor:" in a pop up window from the Extension Manager. However, the function is defined in the attached addin.cxx as extern "C", see the bottom of adding.cxx.

Probably consequently, I cannot see the four test functions METHOD1 … METHOD4 in the function browser.

Any hint at what is wrong with my example would be much appreciated!

Best regards,
Roland

You can download the files mentioned below from
http://www.lichters.net/download.html -> CalcAddin.
Regards,
Roland