yet more compilation woes...

Frank Fock Frank.Fock____t-online.de
Wed Apr 9 00:25:10 CEST 2003


Hi Rich,

The documentation is correct, the project file
for the AgentX++ master agent is not. Thus,
please set the property "agentX" to "no" for your
master code.

In general, generating a AgentX++ master agent
should not be different than generating a normal
AGENT++ agent. Thus, you could also use the
AGENT++v3.5.10 templates for generating code for
your master agent.

The AgentX++ master project file will be fixed
soon.

Sorry for the trouble caused.

Best regards,
Frank

Rich Coco wrote:
> I seem to be stuck in a mode where I take 2 steps forward and one step 
> back...sigh..
> 
> I decided to update my private mib. i used mibdesigner to do so.
> Then, in agenpro2, i imported the mib (no errors) and regenerated
> both Master and subAgent code.
> 
> However, the MasterAgent code will no longer compile:
> 
> racoco: make -f Makefile.linux
> rm -f  agent.o
> g++ -g -Wall -c -o agent.o -I../include -I../../../include 
> -I../../../../agent++/include -I../../../../snmp++/include 
> -I../../../../snmp++/src agent.cpp
> In file included from ../../../include/agentx_subagent.h:28,
>                  from ../include/sockeye_mib.h:15,
>                  from ../include/module_includes.h:5,
>                  from agent.cpp:42:
> ../../../include/agentx_request.h:33: redefinition of `class
> Agentpp::NoVacm'
> ../../../include/agentx_request.h:33: previous definition here
> ../../../include/agentx_request.h:45: confused by earlier errors,
> bailing out
> make: *** [agent.o] Error 1
> racoco:
> 
> 
> Also, the AgenPro2 documentation (the "Generation Settings" sub-section 
> of the "AGENT++ Code generationProperties" section) for the 'agentX' 
> Property Key says:
> 
>        "Enables code generation for the AgentX++ subagents.
>         This option must not be defined for AgentX++ master agents"
> 
> However, I find in the agenpro2/projects directory, the setting is set 
> to 'yes' for both the master and subagent exampls. In fact, I found that 
> identical code gets generated for either setting!
> 
> But this is not the worst of it. Prior to the above compilation error 
> (fr the ungenerated agent.cpp file), I was actually getting a link-time 
> error with respect to one of the generated files:
> 
> racoco: make -f Makefile.linux
> g++ -g -Wall -c -o sockeye_mib.o -I../include -I../../../include 
> -I../../../../agent++/include -I../../../../snmp++/include 
> -I../../../../snmp++/src sockeye_mib.cpp
> rm -f  sockeye_gra_mib.o
> g++ -g -Wall -c -o sockeye_gra_mib.o -I../include -I../../../include 
> -I../../../../agent++/include -I../../../../snmp++/include 
> -I../../../../snmp++/src sockeye_gra_mib.cpp
> g++ -g -Wall -o agent agent.o sockeye_mib.o sockeye_gra_mib.o  
> -L../../../lib -L../../../../agent++/lib -L../../../../snmp++/lib 
> -L../../../../libdes -lpthread -lagentx++ -lagent++ -lsnmp++ -ldes
> agent.o: In function `snmpTrapsOid type_info function':
> /usr/local/src/SNMP++/agentX++/agen/master/src/../../../../snmp++/include/oid_def.h(.text+0x36): 
> undefined reference to `Agentpp::sockeye_mib::sockeye_mib(void)'
> /usr/local/src/SNMP++/agentX++/agen/master/src/../../../../snmp++/include/oid_def.h(.text+0x96): 
> undefined reference to `Agentpp::sockeye_gra_mib::sockeye_gra_mib(void)'
> collect2: ld returned 1 exit status
> make: *** [agent] Error 1
> 
> 
> That is, the generated code compiled, but would not link due to an 
> undefined reference (my private mibs are called SOCKEYE-MIB and 
> SOCKEYE-GRA-MIB, both of which were imported w/o error into agenpro2).
> 
> In a pique, I removed all generated code (incl. .o files)...and now the 
> (ungenerated) agent.cpp will no longer compile (for the Master agent).
> 
> For what it is worth, I have also determined that I get *identical* code 
> generated for both the Master and subAgent generations (the exception is 
> that a file called includes/module_init.h is generated for the Master, 
> but not the subAgent).
> 
> This is maddening...anyone else using agenpro2?
> have any suggestions?
> 
> Tx,
> 
> - rich
> 






More information about the AGENTPP mailing list