On 04/23/09 04:45, Maximilian Odendahl wrote:
Hi Stephan,

With a stand-alone application you can use "simple bootstrap" (<http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/Transparent_Use_of_Office_UNO_Components>) to easily let your code have available the URE dynamic libraries and all the OOo UNO types and services. Just dlopen'ing your code from some other application, you need to look for other ways to make that work.

thanks for your help. Using -R during linking does seem to do the trick, and it works as well from a shared library, well almost. But I am not able to catch any exception, e.g. when it cannot connect to a running office, it just crashes. As a standalone app this works just fine. Any idea how to solve that?

Using something like

 -R /opt/openoffice.org/ure/lib

during linking will record in your .so or executable an absolute RPATH /opt/openoffice.org/ure/lib (use /usr/ccs/bin/elfdump -d to check). That means that at runtime the URE libraries must be available at that exact path. For URE libraries on Solaris that is probably not a big problem, as virtually any URE installation indeed is at that place (only some developers, running multiple OOo installations simultaneously, put URE/OOo into nonstandard locations), but just be aware. (The "simple bootstrap" stuff, in contrast, would also work with nonstandard URE/OOo installations.)

Not being able to catch exceptions smells like there being multiple instances of C++ runtime libraries (like libCrun.so) in your process. In dbx, proc -map will list all libraries of a running process or core file. Anything suspicious there?

PS: btw, what is the difference between basic-link/ure/lib and ure/, seems to work for both folders and they seem to have exactly the same files?

Not sure where exactly those two directories you mention would be. Normally, there should be just one directory

  /opt/openoffice.org/ure

and two symbolic links

  /opt/openoffice.org/basis3.0/ure-link -> ../ure

and

  /opt/openoffice.org3/basis-link -> ../../openoffice.org/basis3.0

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to