Perhaps the problem is with the Makefile I am using?  

Here it is .... in case someone can find something wrong with it:

CC=gcc
TABLE_01_PREFIX=ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable
TABLE_02_PREFIX=ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable

NETSNMPCONFIG=net-snmp-config


# uncomment this if you have GNU make
#NETSNMPCFLAGS := $(shell $(NETSNMPCONFIG) --base-cflags)
#NETSNMPLIBS := $(shell $(NETSNMPCONFIG) --agent-libs)
NETSNMPCFLAGS=`$(NETSNMPCONFIG) --base-cflags`
NETSNMPLIBS=`$(NETSNMPCONFIG) --agent-libs`

LIBS=$(NETSNMPLIBS)


STRICT_FLAGS = -Wall -Wstrict-prototypes
CFLAGS=-I. $(NETSNMPCFLAGS) $(STRICT_FLAGS)

SRCS = ocStbHostMib_subagent.c \
    $(TABLE_01_PREFIX)_data_get.c \
   $(TABLE_01_PREFIX)_data_set.c \
   $(TABLE_01_PREFIX)_data_access.c \
   $(TABLE_01_PREFIX).c \
   $(TABLE_01_PREFIX)_interface.c \
    $(TABLE_02_PREFIX)_data_get.c \
   $(TABLE_02_PREFIX)_data_set.c \
   $(TABLE_02_PREFIX)_data_access.c \
   $(TABLE_02_PREFIX).c \
   $(TABLE_02_PREFIX)_interface.c

OBJS = ocStbHostMib_subagent.o \
    $(TABLE_01_PREFIX)_data_get.o \
   $(TABLE_01_PREFIX)_data_set.o \
   $(TABLE_01_PREFIX)_data_access.o \
   $(TABLE_01_PREFIX).o \
   $(TABLE_01_PREFIX)_interface.o \
    $(TABLE_02_PREFIX)_data_get.o \
   $(TABLE_02_PREFIX)_data_set.o \
   $(TABLE_02_PREFIX)_data_access.o \
   $(TABLE_02_PREFIX).o \
   $(TABLE_02_PREFIX)_interface.o
   

TARGETS=ocStbHostMib_subagent

..SUFFIXES:
..SUFFIXES: .c .o .deps


all: $(TARGETS)

ocStbHostMib_subagent: $(OBJS) ocStbHostMib_subagent_Makefile
    $(CC) -o ocStbHostMib_subagent $(OBJS) $(LIBS)

clean:
    rm -f $(OBJS) $(TARGETS)




Need Help <[EMAIL PROTECTED]> wrote: Correction in BOLD below

The following files exist (there are more files, but these are the important  
ones):

mibgroup/OC-STB-HOST-MIB/ocStbHostMib_subagent.c
mibgroup/OC-STB-HOST-MIB/ocStbHostMib_subagent_Makefile

mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.c
mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.h

mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.c
mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h



Need Help <[EMAIL PROTECTED]> wrote: I am trying to compile my MIB code so a 
subagent can be  created/started to handle all the SNMP requests for the MIB.

I am trying to compile two tables of my MIB code and my "subagent.c" file 
together to see if I can get them compiled, however, I am getting a "No such 
file" error when I try to compile for the subagent.

The following files exist (there are more files, but these are the important  
ones):

mibgroup/OC-STB-HOST-MIB/ocStbHostMib_subagent.c
mibgroup/OC-STB-HOST-MIB/ocStbHostMib_subagent_Makefile

mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.c
mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.h

mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAnalogVideoTable.c
mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAnalogVideoTable.h



File  "ocStbHostAnalogVideoTable.h" includes file "ocStbHostAVInterfaceTable.h" 
by the following code statement:

  #include 
"OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.h"


When I execute the "ocStbHostMib_subagent_Makefile" file, the 
"ocStbHostAVInterfaceTable" table compiles with three warnings (stated in my 
other posting).  When the "ocStbHostAnalogVideoTable" table tries to compile I 
get the following error:

gcc -I. `net-snmp-config  --base-cflags` -Wall -Wstrict-prototypes   -c -o 
ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable_data_get.o 
ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable_data_get.c
In file included from 
ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable_data_get.c:17:
ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable.h:23:98: 
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.h: No such 
file or directory

This  error indicates it does not like the #include statement (shown above).


Now, I am able to compile the complete code into the "snmpd master agent".  
This means the #include does not cause a problem.  The error only occurs when I 
try to compile the code into a subagent.  

My actual code has not changed so something else must be wrong. 

One difference I can see is when I was compiling into the "snmpd master agent", 
the following files were used to indicate  the location of the "(table).h" 
files.


1) .../mibgroup/OC-STB-HOST-MIB/ocStbHostAVInterfaceTable.h
2) .../mibgroup/OC-STB-HOST-MIB/ocStbHostAnalogVideoTable.h


The "../mibgroup/ocStbHostAVInterfaceTable.h" file had the following line:

 
config_require(OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable);


The "../mibgroup/ocStbHostAnalogVideoTable.h" file had the following line:

 
config_require(OC-STB-HOST-MIB/ocStbHostAnalogVideoTable/ocStbHostAnalogVideoTable);



I would assume these files are NOT used when compiling into a "subagent" so 
perhaps this could be causing the error?  Do I need to have this information 
somewhere else perhaps?

Any idea why the "ocStbHostAVInterfaceTable.h" file can no longer  be included 
properly?


        

---------------------------------
Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get 
online.-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your  XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

            

---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.

 
---------------------------------
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to