FW: Parse error before `{' - superclass inheritance problem

Kjersti Grønnevik kgr____morecom.no
Mon Feb 25 11:36:38 CET 2002


Hi,
sorry about this email
I found the problem...(my mistake)

Kjersti

-----Original Message-----
From: Kjersti Grønnevik 
Sent: 25. februar 2002 11:25
To: agentpp-dl____agentpp.com
Subject: Parse error before `{' - superclass inheritance problem


Hi,

I am using Agent++3.4, Snmp++2.6 (and AgentGen) for unix on Linux Redhat 6.2 with KDevelop and Cygwin on a winNT pc.

The agentGen seemed to create the mibfiles ( myMib.h and myMib.cpp) correctly.
when I try to compile and  make the files in KDevelop I get a mysterious error message:
In file included from myMib.cpp:7:

myMib.h:194:parse error before `{'

In myMib.h at line 194 it says:  

class lvGeneralAgentName: public MibLeaf{
......
As far as I can see the MibLeaf class is decleared in mib.h under Agent++/includes (and mib.h is also included at the top of myMib.h  -  
#include <mib.h>  )
I have also added the include directorys for Agent++ and Snmp++ in the project's options - compiler options and
made lib files for the src files for Snmp++ and Agent++

I have written code with bad syntax in the MibLeaf class in mib.h to see if the compiler checked the mib.h at all, and the bad syntax was detected.
I have created a new class in mib.h and a new class in myMib.h that inheritad the class in mib.h and the same error came:

mib.h:			class Dill{};
myMib.h: 		class Dall: public Dill{};

In file included from myMib.cpp:7:
myMib.h:190:parse error before `{'
myMib.h:194:parse error before `{'

For me it seems that the problem is inheritance between mib.h and myMib.h
and it's a bit strange since the code in myMib.h and myMib.cpp are created by AgentGen.

I would appreciate every help or hint I can get!

Kind regards,
Kjersti



More information about the AGENTPP mailing list