Hi Alex, I executed these steps. 1. click Start - Programs - Microsoft Platform SDK February 2003 - Visual Studio Registration - Register PSDK Directories with Visual Studio 2. Open up a command prompt, run vcvars32 and make sure you see 'C:\Program Files\Microsoft SDK\include' in the INCLUDE environment variable
As you suggested by you but I didn't find the Microsoft SDK include path in the command prompt so I entered the path myself Set PTH=%PATH%;C\Microsoft SDK\include And Executed SetEnv.bat present in C:\Program Files\Microsoft SDK After this set cd(source dir) executed win32\build.bat as specified in the document I got the following errors. C:\Program Files\Microsoft SDK\Include\winsock2.h(403) : warning C4094: untagged 'struct' declared no symbols C:\Program Files\Microsoft SDK\Include\ws2tcpip.h(360) : error C2079: 'AddressIn' uses undefined struct 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\wspiapi.h(173) : error C2027: use of undefined type 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\winsock2.h(3776) : see declaration of 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\wspiapi.h(179) : error C2037: left of 'sin_family' specifies undefined struct/union 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\wspiapi.h(180) : error C2037: left of 'sin_port' specifies undefined struct/union 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\wspiapi.h(181) : error C2037: left of 'sin_addr' specifies undefined struct/union 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\wspiapi.h(187) : error C2027: use of undefined type 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\winsock2.h(3776) : see declaration of 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\wspiapi.h(391) : error C2037: left of 'sin_addr' specifies undefined struct/union 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\wspiapi.h(391) : error C2198: 'WspiapiNewAddrInfo' : too few actual parameters C:\Program Files\Microsoft SDK\Include\wspiapi.h(710) : error C2027: use of undefined type 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\winsock2.h(3776) : see declaration of 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\wspiapi.h(731) : error C2037: left of 'sin_port' specifies undefined struct/union 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\wspiapi.h(767) : error C2037: left of 'sin_addr' specifies undefined struct/union 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(60) : error C2027: use of undefined type 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\winsock2.h(3776) : see declaration of 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(63) : error C2027: use of undefined type 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\winsock2.h(3776) : see declaration of 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(77) : error C2037: left of 'sin_addr' specifies undefined struct/union 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(77) : error C2198: 'inet_ntoa' : too few actual parameters ..\..\snmplib\snmpTCPDomain.c(172) : error C2027: use of undefined type 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\winsock2.h(3776) : see declaration of 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(175) : error C2027: use of undefined type 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\winsock2.h(3776) : see declaration of 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(240) : error C2037: left of 'sin_family' specifies undefined struct/union 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(250) : error C2027: use of undefined type 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\winsock2.h(3776) : see declaration of 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(255) : error C2027: use of undefined type 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\winsock2.h(3776) : see declaration of 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(256) : error C2027: use of undefined type 'sockaddr_in' C:\Program Files\Microsoft SDK\Include\winsock2.h(3776) : see declaration of 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(286) : error C2037: left of 'sin_addr' specifies undefined struct/union 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(286) : warning C4022: 'memcpy' : pointer mismatch for actual parameter 2 ..\..\snmplib\snmpTCPDomain.c(286) : error C2168: 'memcpy' : too few actual parameters for intrinsic function ..\..\snmplib\snmpTCPDomain.c(287) : error C2037: left of 'sin_port' specifies undefined struct/union 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(287) : error C2198: 'htons' : too few actual parameters ..\..\snmplib\snmpTCPDomain.c(288) : error C2037: left of 'sin_port' specifies undefined struct/union 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(288) : error C2198: 'htons' : too few actual parameters ..\..\snmplib\snmpTCPDomain.c(338) : error C2037: left of 'sin_addr' specifies undefined struct/union 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(338) : warning C4022: 'memcpy' : pointer mismatch for actual parameter 2 ..\..\snmplib\snmpTCPDomain.c(338) : error C2168: 'memcpy' : too few actual parameters for intrinsic function ..\..\snmplib\snmpTCPDomain.c(339) : error C2037: left of 'sin_port' specifies undefined struct/union 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(339) : error C2198: 'htons' : too few actual parameters ..\..\snmplib\snmpTCPDomain.c(340) : error C2037: left of 'sin_port' specifies undefined struct/union 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(340) : error C2198: 'htons' : too few actual parameters ..\..\snmplib\snmpTCPDomain.c(380) : error C2079: 'addr' uses undefined struct 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(382) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct sockaddr_in *' ..\..\snmplib\snmpTCPDomain.c(383) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct sockaddr_in *' ..\..\snmplib\snmpTCPDomain.c(394) : error C2079: 'addr' uses undefined struct 'sockaddr_in' ..\..\snmplib\snmpTCPDomain.c(398) : error C2224: left of '.sin_family' must have struct/union type ..\..\snmplib\snmpTCPDomain.c(399) : error C2224: left of '.sin_addr' must have struct/union type ..\..\snmplib\snmpTCPDomain.c(399) : warning C4090: 'function' : different 'const' qualifiers ..\..\snmplib\snmpTCPDomain.c(399) : warning C4022: 'memcpy' : pointer mismatch for actual parameter 1 ..\..\snmplib\snmpTCPDomain.c(399) : warning C4022: 'memcpy' : pointer mismatch for actual parameter 2 ..\..\snmplib\snmpTCPDomain.c(399) : error C2168: 'memcpy' : too few actual parameters for intrinsic function ..\..\snmplib\snmpTCPDomain.c(400) : error C2224: left of '.sin_port' must have struct/union type ..\..\snmplib\snmpTCPDomain.c(401) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct sockaddr_in *' NMAKE : fatal error U1077: 'cl.exe' : return code '0x2' Stop. NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC98\BIN\NMAKE.EXE' : return code '0x2' Stop. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Burger Sent: Sunday, January 02, 2005 8:46 PM To: Sasikumar Bodathula Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Net-snmp windows version building help Hi Sasikumar. It looks like the Platform SDK is not registered correctly with MSVC which is why you are getting the 'socklen_t' undeclared identifier error. To register it, click Start - Programs - Microsoft Platform SDK February 2003 - Visual Studio Registration - Register PSDK Directories with Visual Studio. Open up a command prompt, run vcvars32 and make sure you see 'C:\Program Files\Microsoft SDK\include' in the INCLUDE environment variable. Alex Sasikumar Bodathula wrote: > Hi Alex, > The file which I downloaded (source file) from the net-snmp site > 1. net-snmp-5.1.2.tar.gz (extracted to e:\net-snmp-5.1.2 ) > 2. VC++ 6.0(installed). > 3. Platform SDK installed. > 4. ActivePerl-5.8.6.811 (installed) path c:\Perl. > 5. tar.exe & gzip.exe are available. > 6. gnu_regex.exe (installed). > > I followed the instructions as mentioned in the document during the > build error occurred. > Below I am pasting the error message from the make.out file > > cl.exe /nologo /MD /W3 /GX /O2 /I "." /I ".." /I "..\..\snmplib" /I > "..\.." /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" > /Fp".\release\libsnmp.pch" /YX /Fo".\release\\" /Fd".\release\\" /FD /c > ..\..\snmplib\snmpTCPDomain.c > snmpTCPDomain.c > ..\..\snmplib\snmpTCPDomain.c(172) : error C2065: 'socklen_t' : undeclared > identifier > ..\..\snmplib\snmpTCPDomain.c(172) : error C2146: syntax error : missing ';' > before identifier 'farendlen' > ..\..\snmplib\snmpTCPDomain.c(172) : error C2065: 'farendlen' : undeclared > identifier > ..\..\snmplib\snmpTCPDomain.c(173) : error C2143: syntax error : missing ';' > before 'type' > ..\..\snmplib\snmpTCPDomain.c(201) : error C2065: 'string' : undeclared > identifier > ..\..\snmplib\snmpTCPDomain.c(201) : warning C4047: '=' : 'int ' differs in > levels of indirection from 'char *' > ..\..\snmplib\snmpTCPDomain.c(203) : warning C4022: 'free' : pointer > mismatch for actual parameter 1 > ..\..\snmplib\snmpTCPDomain.c(233) : error C2143: syntax error : missing '{' > before '*' > ..\..\snmplib\snmpTCPDomain.c(235) : error C2371: 'netsnmp_tcp_transport' : > redefinition; different basic types > ..\..\include\net-snmp/library/snmpTCPDomain.h(22) : see declaration > of 'netsnmp_tcp_transport' > ..\..\snmplib\snmpTCPDomain.c(372) : warning C4133: 'return' : incompatible > types - from 'struct netsnmp_transport_s *' to 'int *' > NMAKE : fatal error U1077: 'cl.exe' : return code '0x2' > Stop. > NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC98\BIN\NMAKE.EXE' : > return code '0x2' > Stop. > ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users