Error compiling C++ program "MyFirstAddIn"

Java, C++, C#, Delphi, ??? - Using the UNO bridges

Error compiling C++ program "MyFirstAddIn"

Postby gurxsa » Thu Dec 01, 2016 9:59 pm

this is my fisrt post. I'm italian so, please, sorry for my english.

i'm trying to compile the program described here: ... pleteAddIn
This is my first experience with C++ and UNO Api.

I'm using Eclipse IDE and Mingw as compiler.
My goal is to create a DLL that i could copy under program folder to use, i hope also, with libreofficeportable.

At my last compilation i have only one error. Thi one:

..\myTest.cpp:289:77: error: no matching function for call to 'my_sc_impl::MyService2Impl::MyService2Impl(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>&)'
return static_cast< ::cppu::OWeakObject * >( new MyService2Impl( xContext ) );
..\myTest.cpp:289:77: note: candidates are:
..\myTest.cpp:61:7: note: my_sc_impl::MyService2Impl::MyService2Impl()
class MyService2Impl : public ::cppu::WeakImplHelper5<
..\myTest.cpp:61:7: note: candidate expects 0 arguments, 1 provided
..\myTest.cpp:61:7: note: my_sc_impl::MyService2Impl::MyService2Impl(const my_sc_impl::MyService2Impl&)
..\myTest.cpp:61:7: note: no known conversion for argument 1 from 'const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>' to 'const my_sc_impl::MyService2Impl&'
..\myTest.cpp: In member function 'virtual com::sun::star::lang::Locale my_sc_impl::MyService2Impl::getLocale()':
..\myTest.cpp:302:1: warning: no return statement in function returning non-void [-Wreturn-type]
..\myTest.cpp: In function 'com::sun::star::uno::Reference<com::sun::star::uno::XInterface> my_sc_impl::create_MyService2Impl(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>&)':
..\myTest.cpp:290:1: warning: control reaches end of non-void function [-Wreturn-type]

Now, if i have correctly figure out, seems that the method MyService2Impl don't manage XContent.

Surfing on web i don't find nothing that help me to fix it.

Someone of you have any idea on how i could fix this issue ?

Thanks in advance.
LibreOffice 5.2.3 on Windows 10 64bits
Posts: 1
Joined: Thu Nov 24, 2016 7:14 pm

Return to External Programs

Who is online

Users browsing this forum: No registered users and 1 guest