call for help

"吕宏昌" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Dear:

I have an urgent problem about using SNMP related head file when we use the virtual machine compiles our project.

1,compile environment:

Virtual machine:we use Fedora11 as the virtual machine

kenrnel linux 2.6.29.4-167.fc11.i686.pae

compile tool:/usr/crosstool/gcc-3.4.5.-glibc-2.3.6/arm-linux

2, In the head file, “net-snmp-config.h,net-snmp-includes.h,net-snmp-agent-includes.h” are not included. And the compile result is ok.

3, The result of the project with SNMP related head file.

The folder of net-snmp is in /usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/arm-linux/include/

The result of "make all":

In file included from ../../include/common.h:55,

from net.c:3:

/usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/net-snmp-config.h:33:2: #error "net-snmp-devel package does not work on your architecture"

In file included from ../../include/common.h:57,

from net.c:3:

/usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/net-snmp-includes.h:21:2: #error "Please include before this file"

In file included from /usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/definitions.h:22,

from /usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/net-snmp-includes.h:71,

from ../../include/common.h:57,

from net.c:3:

/usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/types.h:11:2: #error "Please include before this file"

In file included from /usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/definitions.h:22,

from /usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/net-snmp-includes.h:71,

from ../../include/common.h:57,

from net.c:3:

/usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/types.h:175: error: conflicting types for 'intmax_t'

/usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/sys-include/stdint.h:139: error: previous declaration of 'intmax_t' was here

In file included from /usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/types.h:222,

from /usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/definitions.h:22,

from /usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/net-snmp-includes.h:71,

from ../../include/common.h:57,

from net.c:3:

……………………

/usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/include/net-snmp/library/snmp_transport.h:29: warning: array 'netsnmpIPXDomain' assumed to have one element

make[1]: *** [obj] Error 1

make: *** [nms] Error 2

Accessories is the makefile of our project.

What can I do to solve the problem?

Looking forward to your help!

thank you very much for your kind help! please...!

sincerely

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Makefile (text/plain, 1.9 KB)
.SUFFIXES:			    #Çå³ýĬÈϵĺó׺¹æÔò
.SUFFIXES: .o .c		#¶¨Òå×Ô¼ºµÄºó׺Áбí
.PHONY: clean mrclean all	
#ΪÁ˱ÜÃâºÍÎļþÖØÃûµÄÕâÖÖÇé¿ö£¬ÎÒÃÇ¿ÉÒÔʹÓÃÒ»¸öÌØÊâµÄ±ê¼Ç¡°.PHONY¡±À´ÏÔʾµØÖ¸Ã÷Ò»¸öÄ¿±êÊÇ¡°Î±Ä¿±ê¡±


EXECUTABLE := nms           #×îºóÉú³ÉµÄ¿ÉÖ´ÐÐÎļþÃû


GCC_FLAGS = 

CC = arm-linux-gcc 
#CPP = arm-linux-gcc -E


#CC = gcc 
INCLUDE = ./include
LIBDIR = ./lib

#LIBS =  -lnet -luart -lstore -lsnmp -lppc -lonu -ldevmt -lpublic -lsgcc -lsensors -lz -lperl -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmp
#LIBS = -lnet -luart -lstore -lsgcc -lppc -lolt -ldevmt -lpublic -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmp

#LIBS = -lnet -luart -lstore -ldevmt -lppc -lolt  -lsgcc -lpublic -lperl -lcrypto -lsensors -lz -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmp
LIBS =  -luart -lstore -ldevmt -lppc -lolt -lpublic  -lnet
RPATH = -Wl,-rpath,.

#CFLAGS =  -g -lpthread -Os -pipe -Wall -I $(INCLUDE)
CFLAGS =  -g -lpthread -I $(INCLUDE)


SOURCES = $(wildcard *.c)
OBJS =  *.o

all:	$(EXECUTABLE)

$(EXECUTABLE):	$(SOURCES) 
	(cd ./apps/net && make)
	(cd ./apps/olt && make)
	(cd ./apps/ppc && make)
	(cd ./apps/devmt && make)
	(cd ./apps/store && make)
	(cd ./apps/uart && make)
	(cd ./apps/public && make)
#	(cd ./apps/snmp && make)

#	(cd ./lib && cp *.so /embest/rfs/usr/lib)
	$(CC) $^ $(CFLAGS) -L$(LIBDIR) $(LIBS) $(RPATH) -o $@

#	@cp $(EXECUTABLE) /embest/rfs/usr/

	
init:
#export LD_LIBRARY_PATH=/home/user1/arm_proj/lib
	@export LD_LIBRARY_PATH=$(pwd)/lib


clean:
	rm -f *.o $(EXECUTABLE)
	(cd ./lib && rm -f *.so)
	(cd ./apps/devmt && make clean)
	(cd ./apps/net && make clean)
	(cd ./apps/olt && make clean)
	(cd ./apps/ppc && make clean)
#	(cd ./apps/snmp && make clean)
	(cd ./apps/store && make clean)
	(cd ./apps/uart && make clean)
	(cd ./apps/public && make clean)
	
mrclean:	clean

# tags
tags:	$(SOURCES)
	ctags -o tags $^ *.h
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.