Re: Getting following error in compilation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19 January 2018 at 12:52, Jonathan Wakely wrote:
> On 19 January 2018 at 12:23, Mohammed, Shaikh Riaj wrote:
>> Hi,
>> I am getting following error while compile with gcc(gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC))
>>
>> /usr/bin/gcc -fpic -fpermissive -Wno-deprecated -Wcpp -D_POSIX_PTHREAD_SEMANTICS -fpic -fpermissive -Wno-deprecated -Wcpp -DPLATFORM_LINUX -DPLATFORM_LINUX_3_10_0_693_el7_x86_64 -D_RWCONFIG_m -D_LINUX -I/usr/opt/temip/tfc/include -I/usr/opt/temip/mmtoolkit/include -I/usr/opt/temip/acloc/include -I/usr/opt/temip/ocs/include -I/usr/opt/temip/tal/include -DPOSIX_4D9 -I. -I/sdboracle/orabase/product/10.2.0/rdbms/demo -I./../../../include -I./../../../include/cxx -I/Nuncas/oracle/app/oracle/oracle_ba/product/12.2.0/dbhome_1/rdbms/public -c Configuration.cxx Configuration.cxx ...
>> In file included from ./../../../include/OInstance.hxx:43:0,
>>                  from Configuration.cxx:37:
>> ./../../../include/OInstanceList.hxx:53:40: error: âOInstanceâ was not declared in this scope
>> class OInstanceList : public std::list<OInstance*>, public MTraceableObject {
>>                                         ^
>> ./../../../include/OInstanceList.hxx:53:50: error: template argument 1 is invalid
>> class OInstanceList : public std::list<OInstance*>, public MTraceableObject {
>>                                                   ^
>> ./../../../include/OInstanceList.hxx:53:50: error: template argument 2 is invalid
>>
>> Need your help for the resolution
>
> This is not a problem with GCC, it's a problem with your C++ code, so
> we can't help you.
>
> You need to ensure OInstance has been declared.

You probably have a circular include, where OInstance.hxx tries to
include OInstanceList.hxx, which tries to include OInstance.hxx again.

Find somebody who can explain how the C++ preprocessor works and how
to fix the circular dependency, probably by adding a forward
declaration of OInstance to OInstanceList.hxx




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux