genivi-ipc@lists.genivi.org

Development list for inter process communication (IPC) related topics

View all threads

Re: [Genivi-ipc] Question about CommonAPI C++ D-Bus tutorial (Build error)

김법모
Fri, Feb 17, 2017 6:25 AM

Add members.

lgetaewon.kim

jiho.kang

Beopmo Kim

Assistant Research Engineer | AVN1 Development5 Part1 | LG Electronics VC

Mobile : +82-10-7169-5745

Email :  mailto:beopmo.kim@lge.com beopmo.kim@lge.com

From: 김법모 [mailto:beopmo.kim@lge.com]
Sent: Friday, February 17, 2017 3:24 PM
To: 'genivi-ipc@lists.genivi.org' genivi-ipc@lists.genivi.org
Subject: Question about CommonAPI C++ D-Bus tutorial (Build error)

Hi~

This is Beopmo KIM from LG Electronics.

I am under developing a function for navigation using CommonAPI C++ D-Bus.

And I found a tutorial page below.

(https://genivi-oss.atlassian.net/wiki/pages/viewpage.action?pageId=5472316)

So I did Step.1~Step5.

But there is a problem during Step.6 Build and run.

Can you help me about this build error?.

bmk@bmk-VirtualBox:~/work/project/build$ make

[ 10%] Building CXX object
CMakeFiles/HelloWorldService.dir/src/HelloWorldService.cpp.o

[ 20%] Building CXX object
CMakeFiles/HelloWorldService.dir/src/HelloWorldStubImpl.cpp.o

[ 30%] Building CXX object CMakeFiles/HelloWorldService.dir/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp.o

In file included from /home/bmk/work/project/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:11:0:

/home/bmk/work/project/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.hpp:50:28: error:
‘StubAttributeTable’ in namespace ‘CommonAPI::DBus’ does not name a type

 const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable();

                        ^

/home/bmk/work/project/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.hpp:80:22: error:
‘StubAttributeTable’ in namespace ‘CommonAPI::DBus’ does not name a type

 CommonAPI::DBus::StubAttributeTable stubAttributeTable_;

                  ^

/home/bmk/work/project/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.hpp:44:24: error: conflicting
return type specified for ‘virtual const bool
v1_0::commonapi::HelloWorldDBusStubAdapterInternal::hasFreedesktopProperties
()’

 virtual const bool hasFreedesktopProperties();

                    ^

In file included from /home/bmk/work/project/../capicxx-dbus-
runtime/include/CommonAPI/DBus/DBusStubAdapterHelper.hpp:20:0,

             from /home/bmk/work/project/src-

gen/v1_0/commonapi/HelloWorldDBusStubAdapter.hpp:21,

             from /home/bmk/work/project/src-

gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:11:

/home/bmk/work/project/../capicxx-dbus-
runtime/include/CommonAPI/DBus/DBusStubAdapter.hpp:47:36: error:
overriding ‘virtual bool
CommonAPI::DBus::DBusStubAdapter::hasFreedesktopProperties()’

 COMMONAPI_EXPORT virtual bool hasFreedesktopProperties();

                                ^

/home/bmk/work/project/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:79:24: error:
‘StubAttributeTable’ in namespace ‘CommonAPI::DBus’ does not name a type

const CommonAPI::DBus::StubAttributeTable&
HelloWorldDBusStubAdapterInternal::getStubAttribut

                    ^

/home/bmk/work/project/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp: In constructor
‘v1_0::commonapi::HelloWorldDBusStubAdapterInternal::HelloWorldDBusStubAdap
terInternal(const CommonAPI::DBus::DBusAddress&, const
std::shared_ptrCommonAPI::DBus::DBusProxyConnection&, const
std::shared_ptrCommonAPI::StubBase&)’:

/home/bmk/work/project/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:92:9: error: class
‘v1_0::commonapi::HelloWorldDBusStubAdapterInternal’ does not have any
field named ‘stubAttributeTable_’

     stubAttributeTable_() {

     ^

/home/bmk/work/project/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:92:29: error: no matching
function for call to
‘CommonAPI::DBus::DBusStubAdapterHelper<v1_0::commonapi::HelloWorldStub>::D
BusStubAdapterHelper(const CommonAPI::DBus::DBusAddress&, const
std::shared_ptrCommonAPI::DBus::DBusProxyConnection&,
std::shared_ptr<v1_0::commonapi::HelloWorldStub>, bool)’

     stubAttributeTable_() {

                         ^

In file included from /home/bmk/work/project/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.hpp:21:0,

             from /home/bmk/work/project/src-

gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:11:

/home/bmk/work/project/../capicxx-dbus-
runtime/include/CommonAPI/DBus/DBusStubAdapterHelper.hpp:127:5: note:
candidate: CommonAPI::DBus::DBusStubAdapterHelper<StubClass_, Stubs_
...>::DBusStubAdapterHelper(const CommonAPI::DBus::DBusAddress&, const
std::shared_ptrCommonAPI::DBus::DBusProxyConnection&, bool, const
std::shared_ptrCommonAPI::StubBase&) [with StubClass_ =
v1_0::commonapi::HelloWorldStub; Stubs_ = {}]

 DBusStubAdapterHelper(const DBusAddress &_address,

 ^

/home/bmk/work/project/../capicxx-dbus-
runtime/include/CommonAPI/DBus/DBusStubAdapterHelper.hpp:127:5: note:  no
known conversion for argument 3 from
‘std::shared_ptr<v1_0::commonapi::HelloWorldStub>’ to ‘bool’

/home/bmk/work/project/../capicxx-dbus-
runtime/include/CommonAPI/DBus/DBusStubAdapterHelper.hpp:117:7: note:
candidate:
CommonAPI::DBus::DBusStubAdapterHelper<v1_0::commonapi::HelloWorldStub>::DBu
sStubAdapterHelper(const
CommonAPI::DBus::DBusStubAdapterHelper<v1_0::commonapi::HelloWorldStub>&)

class DBusStubAdapterHelper<StubClass_, Stubs_...>:

   ^

/home/bmk/work/project/../capicxx-dbus-
runtime/include/CommonAPI/DBus/DBusStubAdapterHelper.hpp:117:7: note:
candidate expects 1 argument, 4 provided

CMakeFiles/HelloWorldService.dir/build.make:110:
'CMakeFiles/HelloWorldService.dir/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp.o' 타겟에 대한 명령이
실패했습니다

make[2]: *** [CMakeFiles/HelloWorldService.dir/src-
gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp.o] 오류 1

CMakeFiles/Makefile2:67: 'CMakeFiles/HelloWorldService.dir/all' 타겟에 대한
명령이 실패했습니다

make[1]: *** [CMakeFiles/HelloWorldService.dir/all] 오류 2

Thanks.

Beopmo Kim

Assistant Research Engineer | AVN1 Development5 Part1 | LG Electronics VC

Mobile : +82-10-7169-5745

Email : beopmo.kim@lge.com mailto:beopmo.kim@lge.com

Add members. lgetaewon.kim jiho.kang Beopmo Kim Assistant Research Engineer | AVN1 Development5 Part1 | LG Electronics VC Mobile : +82-10-7169-5745 Email : <mailto:beopmo.kim@lge.com> beopmo.kim@lge.com From: 김법모 [mailto:beopmo.kim@lge.com] Sent: Friday, February 17, 2017 3:24 PM To: 'genivi-ipc@lists.genivi.org' <genivi-ipc@lists.genivi.org> Subject: Question about CommonAPI C++ D-Bus tutorial (Build error) Hi~ This is Beopmo KIM from LG Electronics. I am under developing a function for navigation using CommonAPI C++ D-Bus. And I found a tutorial page below. (https://genivi-oss.atlassian.net/wiki/pages/viewpage.action?pageId=5472316) So I did Step.1~Step5. But there is a problem during Step.6 Build and run. Can you help me about this build error?. bmk@bmk-VirtualBox:~/work/project/build$ make [ 10%] Building CXX object CMakeFiles/HelloWorldService.dir/src/HelloWorldService.cpp.o [ 20%] Building CXX object CMakeFiles/HelloWorldService.dir/src/HelloWorldStubImpl.cpp.o [ 30%] Building CXX object CMakeFiles/HelloWorldService.dir/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp.o In file included from /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:11:0: /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.hpp:50:28: error: ‘StubAttributeTable’ in namespace ‘CommonAPI::DBus’ does not name a type const CommonAPI::DBus::StubAttributeTable& getStubAttributeTable(); ^ /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.hpp:80:22: error: ‘StubAttributeTable’ in namespace ‘CommonAPI::DBus’ does not name a type CommonAPI::DBus::StubAttributeTable stubAttributeTable_; ^ /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.hpp:44:24: error: conflicting return type specified for ‘virtual const bool v1_0::commonapi::HelloWorldDBusStubAdapterInternal::hasFreedesktopProperties ()’ virtual const bool hasFreedesktopProperties(); ^ In file included from /home/bmk/work/project/../capicxx-dbus- runtime/include/CommonAPI/DBus/DBusStubAdapterHelper.hpp:20:0, from /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.hpp:21, from /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:11: /home/bmk/work/project/../capicxx-dbus- runtime/include/CommonAPI/DBus/DBusStubAdapter.hpp:47:36: error: overriding ‘virtual bool CommonAPI::DBus::DBusStubAdapter::hasFreedesktopProperties()’ COMMONAPI_EXPORT virtual bool hasFreedesktopProperties(); ^ /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:79:24: error: ‘StubAttributeTable’ in namespace ‘CommonAPI::DBus’ does not name a type const CommonAPI::DBus::StubAttributeTable& HelloWorldDBusStubAdapterInternal::getStubAttribut ^ /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp: In constructor ‘v1_0::commonapi::HelloWorldDBusStubAdapterInternal::HelloWorldDBusStubAdap terInternal(const CommonAPI::DBus::DBusAddress&, const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>&, const std::shared_ptr<CommonAPI::StubBase>&)’: /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:92:9: error: class ‘v1_0::commonapi::HelloWorldDBusStubAdapterInternal’ does not have any field named ‘stubAttributeTable_’ stubAttributeTable_() { ^ /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:92:29: error: no matching function for call to ‘CommonAPI::DBus::DBusStubAdapterHelper<v1_0::commonapi::HelloWorldStub>::D BusStubAdapterHelper(const CommonAPI::DBus::DBusAddress&, const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>&, std::shared_ptr<v1_0::commonapi::HelloWorldStub>, bool)’ stubAttributeTable_() { ^ In file included from /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.hpp:21:0, from /home/bmk/work/project/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp:11: /home/bmk/work/project/../capicxx-dbus- runtime/include/CommonAPI/DBus/DBusStubAdapterHelper.hpp:127:5: note: candidate: CommonAPI::DBus::DBusStubAdapterHelper<StubClass_, Stubs_ ...>::DBusStubAdapterHelper(const CommonAPI::DBus::DBusAddress&, const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>&, bool, const std::shared_ptr<CommonAPI::StubBase>&) [with StubClass_ = v1_0::commonapi::HelloWorldStub; Stubs_ = {}] DBusStubAdapterHelper(const DBusAddress &_address, ^ /home/bmk/work/project/../capicxx-dbus- runtime/include/CommonAPI/DBus/DBusStubAdapterHelper.hpp:127:5: note: no known conversion for argument 3 from ‘std::shared_ptr<v1_0::commonapi::HelloWorldStub>’ to ‘bool’ /home/bmk/work/project/../capicxx-dbus- runtime/include/CommonAPI/DBus/DBusStubAdapterHelper.hpp:117:7: note: candidate: CommonAPI::DBus::DBusStubAdapterHelper<v1_0::commonapi::HelloWorldStub>::DBu sStubAdapterHelper(const CommonAPI::DBus::DBusStubAdapterHelper<v1_0::commonapi::HelloWorldStub>&) class DBusStubAdapterHelper<StubClass_, Stubs_...>: ^ /home/bmk/work/project/../capicxx-dbus- runtime/include/CommonAPI/DBus/DBusStubAdapterHelper.hpp:117:7: note: candidate expects 1 argument, 4 provided CMakeFiles/HelloWorldService.dir/build.make:110: 'CMakeFiles/HelloWorldService.dir/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp.o' 타겟에 대한 명령이 실패했습니다 make[2]: *** [CMakeFiles/HelloWorldService.dir/src- gen/v1_0/commonapi/HelloWorldDBusStubAdapter.cpp.o] 오류 1 CMakeFiles/Makefile2:67: 'CMakeFiles/HelloWorldService.dir/all' 타겟에 대한 명령이 실패했습니다 make[1]: *** [CMakeFiles/HelloWorldService.dir/all] 오류 2 Thanks. Beopmo Kim Assistant Research Engineer | AVN1 Development5 Part1 | LG Electronics VC Mobile : +82-10-7169-5745 Email : beopmo.kim@lge.com <mailto:beopmo.kim@lge.com>