OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

C++ Addin For Calc Version 3 - CannotRegisterImplementationE

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
eric_4567
Newbie
Newbie


Joined: 30 Jan 2009
Posts: 1

PostPosted: Fri Jan 30, 2009 10:05 am    Post subject: C++ Addin For Calc Version 3 - CannotRegisterImplementationE Reply with quote

Hi All,

Has anyone succeeded in implementing a C++ Calc addin for OpenOffice.org version 3?

I have a Calc addin which was first implemented for OpenOffice.org Calc version 1 and has been upgraded once or twice a year to the latest OpenOffice.org version.

Now when I build it for OpenOffice.org Calc version 3, regcomp fails with CannotRegisterImplementationException:

Code:
regcomp -register -r xxx.rdb -c libxxx.so
libxxx.so
register component 'libxxx.so' in registry 'xxx.rdb' failed!
error (CannotRegisterImplementationException): loading component library failed: libxxx.so

I guess there is a problem loading the shared library, but I can't see what it is. ldd doesn't report any problems.

So I decided to try instead with a "hello world" C++ Calc addin. The least out of date one that I found is this:

http://wiki.services.openoffice.org/wiki/SimpleCalcAddIn

That's from 2006. I had to make a lot of changes to get it to build:

- My SDK bin directory is /usr/lib64/openoffice.org/basis3.0/sdk/bin. There I find various build tools including idlc, regmerge, and cppumaker, but not regcomp, which is in /usr/lib64/openoffice.org/ure/bin.

- I don't have libcppuhelpergcc3.so, the closest thing is /usr/lib64/openoffice.org/ure/lib/libuno_cppuhelpergcc3.so.3. I still created a symbolic link as described in the document.

- In the past I always used types.db from the program directory, now it seems that this file has been split across some or all of the following:

Code:
/usr/lib64/openoffice.org/basis3.0/program/legacy_binfilters.rdb
/usr/lib64/openoffice.org/basis3.0/program/offapi.rdb
/usr/lib64/openoffice.org/basis3.0/program/oovbaapi.rdb
/usr/lib64/openoffice.org/basis3.0/program/services.rdb
/usr/lib64/openoffice.org/ure/share/misc/services.rdb
/usr/lib64/openoffice.org/ure/share/misc/types.rdb

- The link failed with this error:

Code:
ld: RNG_impl.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC


So I recompiled with the given flag and it linked OK.

I guess that all of these changes are necessary because the document is out of date. I am on Fedora 10, the SDK has been packaged as an RPM and I wonder if I have installed it incorrectly. Why have some files been moved from the sdk directory tree to the ure directory tree?

Anyway now the build of this hello world project fails in exactly the same way as my own project:

Code:
$ regcomp -register -r *.rdb -c *.so
libRNG.so
register component 'libRNG.so' in registry 'RNG.rdb' failed!
error (CannotRegisterImplementationException): loading component library failed: libRNG.so

What am I doing wrong? Has anyone gotten this to work? Is any of this stuff documented anywhere?

Thanks,
Eric
Back to top
View user's profile Send private message
ericehlers
Newbie
Newbie


Joined: 31 Jan 2009
Posts: 2

PostPosted: Sat Jan 31, 2009 7:57 am    Post subject: Reply with quote

OK, I got the example working, and I updated the document to reflect the changes necessary for OOo 3:

http://wiki.services.openoffice.org/wiki/Calc/Add-In/Simple_Calc_Add-In

Regards,
Eric
_________________
Eric Ehlers
nazcatech sprl | Brussels | http://www.nazcatech.be
* Distributed computing for pricing analytics
* Use OpenOffice.org Calc as a client to the Grid
Back to top
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Mon Feb 02, 2009 11:49 am    Post subject: Reply with quote

Quote:
ericehlers or eric_4567

Are you the previous eric_1234 ?
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
ericehlers
Newbie
Newbie


Joined: 31 Jan 2009
Posts: 2

PostPosted: Wed Feb 04, 2009 12:45 pm    Post subject: Reply with quote

Hi Serge,

Long time no speak.

SergeM wrote:
Quote:
ericehlers or eric_4567

Are you the previous eric_1234 ?


Yes I am - sorry I have been monkeying around with my user ID. A couple days ago I sent an email to the address on your website, if it didn't get through pls message me here.

Regards,
Eric
_________________
Eric Ehlers
nazcatech sprl | Brussels | http://www.nazcatech.be
* Distributed computing for pricing analytics
* Use OpenOffice.org Calc as a client to the Grid
Back to top
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Thu Feb 05, 2009 11:40 am    Post subject: Reply with quote

OK I will send you a private mail.
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group