Bootstrap exception while using sdk on Linux.

Rodnyansky Pavel turnedon at mail.ru
Mon Dec 26 09:01:29 UTC 2016


Hello!  I'm given a task to write a crossplatform Qt/C++ program which
integrates with LibreOffice calc and do some stuff with spreadsheet docs. I
managed to get it running on Windows, got the basics of Uno API and now have
to do the same on Linux platform. My project compiles, but i m getting
BootstrapException on the very first line:

Reference< XComponentContext > rContext(::cppu::bootstrap());

Unfortunately i can not provide additional info about exception because
OUStrings don't work as well;

*This is the result of e.getMessage() in catch block*
		errMessage	@0x7ffcadd13b70	rtl::OUString
			pData	@0x7fba764aed88	rtl_uString
				buffer	@0x7fba764aed98	sal_Unicode [1]
					[0]	111	sal_Unicode
				length	32369759767953518	sal_Int32
				refCount	128849018882	oslInterlockedCount


I tried also another way ,described in this article 
DevGuide/ProUNO/C++/Establishing_Interprocess_Connections
<https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C++/Establishing_Interprocess_Connections>  
- i got an empty pointer trying to get instance of XUnoResolver. At this
point a have no idea what to do next, my guess is that there is some problem
with linking shared .so libraries.

*My current setup:*
- Ubuntu 16.04 LTS 64 bit
- LibreOffice and sdk installed from deb packages, both version 5.2.3 x86-64
- Made /opt/libreoffice/program path globally visible by adding it to
ld.so.conf.d. Maybe i should add something else?
- Not sure if i need setsdk_env script. Tried with and without it, with no
visible difference.
- I compiled couple of basic included examples, but was unable to run them
afterwards 

*Countermain example output*
countermain: ../../../include/com/sun/star/uno/Reference.h:411:
interface_type* com::sun::star::uno::Reference<interface_type>::operator->()
const [with interface_type = com::sun::star::lang::XComponent]: Assertion
`_pInterface != NULL' failed.
Aborted (core dumped)

*setsdkenv_unix output*
 * SDK = /opt/libreoffice5.2/sdk
 * Office = /opt/libreoffice5.2
 * Make = /usr/bin
 * Zip = /usr/bin
 * cat = /bin
 * sed = /bin
 * C++ Compiler = /usr/bin
 * Java = 
 * SDK Output directory = /home/pavel/libreoffice5.2_sdk
 * Auto deployment = YES

I would highly appreciate any tips and advises.
Btw is this the right forum for this kind of quesions or maybe i should ask
somewhere else?



--
View this message in context: http://nabble.documentfoundation.org/Bootstrap-exception-while-using-sdk-on-Linux-tp4203562.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list