Hi!

I was able to *manually* compile snmpd.exe and snmptrapd.exe under MinGW to include the resource file for the EventLog. This removes the 'The description for Event ID ( 100 ) in Source ( Net-SNMP Trap Handler ) cannot be found. ' messages.

I am hoping someone can take my steps and transform them into the Makefiles. (Andy? :)

I have attached the steps as some of the lines are rather long..

Alex

./configure --prefix="c:/usr-mingw" --with-mibdirs="c:/usr-mingw/share/snmp/mibs" 
--with-mib-modules="agentx disman/event-mib examples/example" 

# Build everything
make

# Compile the .rc file using MinGW windres (needs winservice.rc and MSG00001.bin file)
# Compile in to winservicerc.o so we don't erase winservice.o!
cd snmplib
/bin/sh ../libtool --mode=compile windres -o winservicerc.o winservice.rc
cd ..

# Delete snmpd.exe and re-run the last libtool command that was run via make but 
append ../snmplib/winservicerc.lo
cd agent
rm snmpd.exe
make
rm snmpd.exe
#copy/paste last '/bin/sh ../libtool' command and append ../snmplib/winservicerc.lo to 
lib list.  For example, change:
/bin/sh ../libtool  --mode=link gcc -g -O2 -Dmingw32 -Wall -Winline 
-Wstrict-prototypes -Wwrite-strings -Wcast-qual -Wno-char-subscripts -o snmpd.exe 
snmpd.lo   libnetsnmpmibs.la libnetsnmpagent.la helpers/libnetsnmphelpers.la  
../snmplib/libnetsnmp.la -lm  -liphlpapi -lregex -lws2_32
 to:
/bin/sh ../libtool  --mode=link gcc -g -O2 -Dmingw32 -Wall -Winline 
-Wstrict-prototypes -Wwrite-strings -Wcast-qual -Wno-char-subscripts -o snmpd.exe 
snmpd.lo   libnetsnmpmibs.la libnetsnmpagent.la helpers/libnetsnmphelpers.la  
../snmplib/libnetsnmp.la ../snmplib/winservicerc.lo -lm  -liphlpapi -lregex -lws2_32
# Register and test
./snmpd -register
# Check the event log

# Delete snmptrapd.exe and re-run the last libtool command that was run via make but 
append ../snmplib/winservicerc.lo
cd ../apps
rm snmptrapd.exe
make
rm snmptrapd.exe
#copy/paste last '/bin/sh ../libtool' command and append ../snmplib/winservicerc.lo to 
lib list.  For example, change:
/bin/sh ../libtool  --mode=link gcc -o snmptrapd.exe snmptrapd.lo libnetsnmptrapd.la 
-L../snmplib -L../agent -L../agent/helpers  ../agent/libnetsnmpagent.la 
../agent/libnetsnmpmibs.la ../agent/helpers/libnetsnmphelpers.la 
../snmplib/libnetsnmp.la  -lm  -liphlpapi -lregex -lws2_32
 to:
/bin/sh ../libtool  --mode=link gcc -o snmptrapd.exe snmptrapd.lo libnetsnmptrapd.la 
-L../snmplib -L../agent -L../agent/helpers  ../agent/libnetsnmpagent.la 
../agent/libnetsnmpmibs.la ../agent/helpers/libnetsnmphelpers.la 
../snmplib/libnetsnmp.la ../snmplib/winservicerc.lo -lm  -liphlpapi -lregex -lws2_32
# Register and test
./snmptrapd -register
# Check the event log
cd ..







Reply via email to