[AGENT++] Compilation Problem: including h file in my_mib.cpp

Patrice Bentolila patricebento at hotmail.com
Thu Oct 28 17:15:30 CEST 2004


Hi Frank,
no problem, hope your hd is now safe.

here is the first 32 lines of sogetek_fvid_mib_v1_v2.cpp, it stops in deed 
at the first call of
mib oid singleton:

==========================================================

//--AgentGen BEGIN=_BEGIN
//--AgentGen END

#ifndef _sogetek_fvid_mib_v1_v2_cpp
#define _sogetek_fvid_mib_v1_v2_cpp

#include <sogetek_fvid_mib_v1_v2.h>
#include <module_includes.h>

//--AgentGen BEGIN=_INCLUDE
//#include "CSnmpAgentFvid.h"
//--AgentGen END



#ifdef AGENTPP_NAMESPACE
namespace Agentpp {
#endif


// Scalar Objects


/**
*  mstSrvState
*
* "L'etat du cluster maitre."
*/

mstSrvState* mstSrvState::instance = 0;
...
============================================

and here is the namespace declaration in CSnmpAgentFvid.h (i.e. 
my_traitements.h) :
....
//CSnmpAgentFvid include files

#include <module_includes.h>

#ifdef AGENTPP_NAMESPACE
using namespace Agentpp;
#endif
...


Best Regards.
Patrice.


>From: Frank Fock <fock at agentpp.com>
>To: Patrice Bentolila <patricebento at hotmail.com>
>CC: agentpp at agentpp.org
>Subject: Re: [AGENT++] Compilation Problem: including h file in my_mib.cpp
>Date: Thu, 28 Oct 2004 12:45:24 +0200
>
>Hi Patrice,
>
>Please excuse that I did not answer your private email, but my hardrive
>crashed totally yesterday and I lost my emails from the last couple of
>days (the email folder was not part of the daily backup :-( )
>
>Can you send me the first 32 lines of the sogetek_fvid_mib_v1_v2.cpp
>file and the namespace definition of the my_traitements.h?
>I will try to figure out what went wrong then.
>
>Best regards,
>Frank
>
>Patrice Bentolila wrote:
>
>>Hi Franck,
>>
>>I'm using agenpro2 to generate a subagentX++.
>>the subagentX++ compiled OK and worked well until I added my_traitements.h 
>>in my_mib.cpp (i.e. sogetek_fvid_mib_v1_v2.cpp) to perform some operations 
>>during mib set requests.
>>the my_traitements.h/cpp works well and is called from agent.cpp file.
>>
>>here's part of the output compilation:
>>".....g++ -g -Wall -c -o sogetek_fvid_mib_v1_v2.o -I../include 
>>-I../../../include -I../../../../agent++/include 
>>-I../../../../snmp++/include sogetek_fvid_mib_v1_v2.cpp
>>sogetek_fvid_mib_v1_v2.cpp:32: parse error before `3001'
>>sogetek_fvid_mib_v1_v2.cpp:111: syntax error before `.'
>>sogetek_fvid_mib_v1_v2.cpp:432: syntax error before `.'
>>sogetek_fvid_mib_v1_v2.cpp:753: syntax error before `.'
>>sogetek_fvid_mib_v1_v2.cpp:834: syntax error before `.'
>>sogetek_fvid_mib_v1_v2.cpp:835: syntax error before `->'
>>sogetek_fvid_mib_v1_v2.cpp:1079: syntax error before `.'
>>sogetek_fvid_mib_v1_v2.cpp:1222: parse error before `2021'
>>sogetek_fvid_mib_v1_v2.cpp:1725: syntax error before `.'
>>sogetek_fvid_mib_v1_v2.cpp:1835: syntax error before `.'
>>sogetek_fvid_mib_v1_v2.cpp:2450: syntax error before `.'
>>sogetek_fvid_mib_v1_v2.cpp:4008: parse error before `1108'
>>sogetek_fvid_mib_v1_v2.cpp:4372: syntax error before `.'
>>sogetek_fvid_mib_v1_v2.cpp:5656: parse error before `2051'
>>sogetek_fvid_mib_v1_v2.cpp:6112: parse error before `1307'
>>sogetek_fvid_mib_v1_v2.cpp:6280: parse error before `1401'
>>sogetek_fvid_mib_v1_v2.cpp:6506: parse error before `3501'
>>sogetek_fvid_mib_v1_v2.cpp:6691: syntax error before `.'
>>sogetek_fvid_mib_v1_v2.cpp:6801: syntax error before `.'
>>make: *** [sogetek_fvid_mib_v1_v2.o] Interruption"
>>
>>it seems to be a name space problem. my_traitements.h uses Agentpp name 
>>space and includes my_mib.h. but I'm using #ifndef statements to 
>>encapsulate the content of every h file.
>>Do you have an idea of what's happening?
>>
>>Regards.
>>Patrice.
>>
>>_________________________________________________________________
>>MSN Hotmail : antivirus et antispam intégrés 
>>http://www.msn.fr/newhotmail/Default.asp?Ath=f
>>
>>_______________________________________________
>>AGENTPP mailing list
>>AGENTPP at agentpp.org
>>http://agentpp.org/mailman/listinfo/agentpp
>>
>
>

_________________________________________________________________
MSN Hotmail : antivirus et antispam intégrés http://search.msn.fr




More information about the AGENTPP mailing list