Operating System - HP-UX
1829117 Members
2108 Online
109986 Solutions
New Discussion

cannot access protected member

 
jgobbur
Advisor

cannot access protected member

In hp parisc platform.
I am following strange error saying that connot access protected member.
`if [ -d /usr/local/packages/compiler_remote/ansic35098-35101_aCCA03.70 ]; then echo '/usr/local/packages/compiler_remote/ansic35098-35101_aCCA03.70'; else echo ''; fi `/opt/aCC/bin/aCC clsnDaemonAgent.cpp -c -o clsnDaemonAgent.o -g -z +Z +DA2.0W +DS2.0 -w -AA -DHPUX -DORA_CPP -DSS_64BIT_SERVER -DHPPA64 -DSLS8NATIVE -DSLU8NATIVE -D_LARGEFILE64_SOURCE -D_RWSTD_MULTI_THREAD -D_REENTRANT -DSLXMX_ENABLE -DHPUX_KTHREAD -DSLTS_ENABLE +Oentrysched +Onolimit +ESlit +Oprocelim +Olibcalls -I/ade/aime_has_432100/oracle/has/src/common/osds -I/ade/aime_has_432100/oracle/has/hcache/ -I. -I./if
Error 182: "clsnDaemonAgent.cpp", line 1194 # "void clsn_agent::DaemonAgent::DaemonCheckThread::run()" cannot access protected member "void clsn_agent::Agent::agentInitiatedCheck()".
m_dmnAgent.agentInitiatedCheck();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When I am trying to access base class protected member through derived class object, I am above issue.
Pls let me know whether it is compiler bug?
1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: cannot access protected member

A.03.70 is obsolete, the latest is A.03.85.
+DA2.0W should be replaced by +DD64.
You shouldn't use -w but +W### for individual messages.
-D_RWSTD_MULTI_THREAD -D_REENTRANT can be replaced by -mt.
+Oentrysched isn't supported if using exception handling.

clsn_agent::DaemonAgent::DaemonCheckThread::run()" cannot access protected member "void clsn_agent::Agent::agentInitiatedCheck()".
m_dmnAgent.agentInitiatedCheck();
>When I am trying to access base class protected member through derived class object

Which are namespaces and which are classes? Which are the base and derived?