Alex Burger wrote:
Alex Burger wrote:
Alex Burger wrote:
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 submitted a patch for the above. Please try it out and let me know what you think. The patch number is 1040325.
BTW, the reason I wanted to get the eventlog code fixed was because the only other thing left to make the MinGW build comparable to MSVC is the Perl modules. I already documented how to build the Perl modules under MinGW but the missing part is the snmplib DLL.
If we can get the host resources MIB working under MinGW (it already works under Cygwin) then it would be even better than the MSVC version.
The embedded Perl is missing from the agent and snmptrapd for MSVC, but I don't think we will ever be able to enable it until everything is thread safe. The agent and snmptrapd need to be static due to thread issues and --enable-embedded-perl requires shared..
Would it be possible to link against the MinGW Perl libraries rather than Active Perl?
I am going to take a look at building the DLL under MinGW. Hopefully it's not that big of a deal.
One trick I have learned with MinGW and building libraries is that you need to use -mms-bitfields. Try something like:
[EMAIL PROTECTED]@ -mms-bitfield
sharedlib: snmplib.c
$(CC) -DWLANCAP_EXPORTS -c -I./ snmplib.c -o snmplib.o
$(CC) -DWLANCAP_EXPORTS -shared -mthreads -o snmplib.dll snmplib.o -lwinmm -lm -lmorestuff
$(DLLWRAP) --export-all --output-def=libsnmplib.def --output-lib=libsnmplib.a --dllname=snmplib.dll -lwinmm -lm
$(CC) -shared -Wl,--enable-auto-image-base -o snmplib.dll -Wl,--out-implib=libsnmplib.dll.a snmplib.o -lwinmm
I think that will get you a running start. I will look at it myself when I get this Linux box back on it's feet. We will probably have to tell it to build the dll during configure also.
Andy
Alex
-- -------------------------- Andy Smith, MCP [EMAIL PROTECTED] --------------------------
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
