Hi Estefan�a.
A recent patch was added to 5.2 that appears to require the SDK as you have noticed. I did a test compile without the SDK about a month ago, so I'm not sure how it didn't get noticed..
This diff shows the changes:
http://cvs.sourceforge.net/viewcvs.py/net-snmp/net-snmp/agent/mibgroup/mibII/system_mib.c?r1=text&tr1=5.5.2.1&r2=text&tr2=5.8&diff_format=h
I will look in to it more so that it compiles without the SDK, but until then, please give the attached patch a try. It will disable that section of code which means sysDescr will not be complete but it should at least compile.
This is just a work around until I can patch it properly.
Alex
Estefan�a Guerrero wrote:
Hello,
I'm using VC++ 6, Windows 2000, and I doesn't have SDK istalled.
I had net-snmp-5.1.2 working with no problem but I would like to use mib2c so I need 5.2
Building the net-snmp-5.2 agent using win32.dws the following errors are reported
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(679) : error C2039: 'wProductType' : is not a member of '_OSVERSIONINFOEXA'
C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(679) : error C2065: 'VER_NT_WORKSTATION' : undeclared identifier
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(682) : error C2039: 'wSuiteMask' : is not a member of '_OSVERSIONINFOEXA'
C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(682) : error C2065: 'VER_SUITE_PERSONAL' : undeclared identifier
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(687) : error C2039: 'wProductType' : is not a member of '_OSVERSIONINFOEXA'
C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(687) : error C2065: 'VER_NT_SERVER' : undeclared identifier
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(689) : error C2039: 'wSuiteMask' : is not a member of '_OSVERSIONINFOEXA'
C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(689) : error C2065: 'VER_SUITE_DATACENTER' : undeclared identifier
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(691) : error C2039: 'wSuiteMask' : is not a member of '_OSVERSIONINFOEXA'
C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(691) : error C2065: 'VER_SUITE_ENTERPRISE' : undeclared identifier
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(693) : error C2039: 'wSuiteMask' : is not a member of '_OSVERSIONINFOEXA'
C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(693) : error C2065: 'VER_SUITE_BLADE' : undeclared identifier
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(699) : error C2039: 'wSuiteMask' : is not a member of '_OSVERSIONINFOEXA'
C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(701) : error C2039: 'wSuiteMask' : is not a member of '_OSVERSIONINFOEXA'
C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
C:\net-snmp-5.2\agent\mibgroup\mibII\system_mib.c(707) : error C2039: 'wSuiteMask' : is not a member of '_OSVERSIONINFOEXA'
C:\Archivos de programa\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(7998) : see declaration of '_OSVERSIONINFOEXA'
It looks like I have to use the Platform SDK because the wProductType member is not defined in OSVERSIONINFOEX structure from WINBASE.h VC98,
but I would prefer not having SDK installed. Could you tell me if there is any other way to solve this?
Thanks in advance,
Estefan�a Guerrero
--- system_mib.c.org Tue Nov 30 18:15:12 2004
+++ system_mib.c Tue Nov 30 18:16:30 2004
@@ -93,7 +93,7 @@
int header_system(struct variable *, oid *, size_t *, int,
size_t *, WriteMethod **);
-#if HAVE_WINSOCK_H
+#if xxHAVE_WINSOCK_H
static void windowsOSVersionString(char [], size_t);
#endif
@@ -369,7 +369,7 @@
version_descr[sizeof(version_descr) - 1] = 0;
version_descr[strlen(version_descr) - 1] = 0; /* chomp new line */
#else
-#if HAVE_WINSOCK_H
+#if xxHAVE_WINSOCK_H
windowsOSVersionString(version_descr, sizeof(version_descr));
#else
strcpy(version_descr, "unknown");
@@ -644,7 +644,7 @@
*
*********************/
-#if HAVE_WINSOCK_H
+#if xxHAVE_WINSOCK_H
static void
windowsOSVersionString(char stringbuf[], size_t stringbuflen)
{
