On Fri, Mar 22, 2019 at 01:15:52PM +0530, prabu varadharajan wrote:
> Dear All,
> 
> Following is my project source code hierarchy,
> + src
>     |
>     +---- snmp
>     |
>     +---- my_app
>     |
>     +---- inc
>             |
>             +---- local_snmp_macros.h
>             +---- my_macros.h
> 
> I have declared few functions and macros in both local_snmp_macros.h and
> my_macros.h files which are being used by both snmp and my_app
> applications. As of now I'm copying the header files before ./configure and
> compilation from src/inc/ to src/snmp/agent/mibgroup and removing those on
> clean which is not recommended. So now I would like to avoid this copying
> overhead and include from src/inc itself.
> 
> For this I have updated ./configure --with-cflags=-I$(pwd)/../inc and able
> to build the application successfully but I'm getting following fatal errors.
> In this case also I'm observing some* weird behaviour* like I have
> included my_macros.h
> and local_snmp_macros.h files in
> src/snmp/include/net-snmp/library/snmp_logging.h whereas I'm getting fatal
> errors for the *first one*(my_macros.h) only. I have tried exploring
> Makefile.* and configure script as well but I could not resolve this one.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> *In file included from
> ./include/net-snmp/output_api.h:181:0,                 from
> ./include/net-snmp/library/snmp_client.h:32,                 from
> ./include/net-snmp/varbind_api.h:102,                 from
> ./include/net-snmp/library/snmp_api.h:33,                 from
> ./include/net-snmp/definitions.h:23,                 from
> ./include/net-snmp/types.h:462,                 from
> include/net-snmp/library/snmpUDPIPv6Domain.h:11,                 from
> module_tmp_header.h:164:./include/net-snmp/library/snmp_logging.h:7:23:
> fatal error: my_macros.h: No such file or directorycompilation terminated.*
> 
> *File include view for reference:*
> #ifndef SNMP_LOGGING_H
> #define SNMP_LOGGING_H
> 
> #include <net-snmp/types.h>
> #include <net-snmp/output_api.h>
> #include "dummy.h"
> #include <my_macros.h>
> #include <local_snmp_macros.h>
> 
> As per my understanding, I suspect the *configure* script only which could
> have some bug. Please correct me if I'm wrong and help me to overcome from
> this error.
> 
> *Note: *I have observed same behaviour in noth Net-SNMP-5.5 and
> Net-SNMP-5.8.pre2 as well.
> 
> Please feel free to ask more details if required that I can provide to
> resolve this issue. Or let me know if any reference link if this issue is
> already reported and resolved.

Could you please show the compile line before the error message (something
like gcc blah blah something.c -o something.o)


_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to