Re: net snmp, Compile error.

Bart Van Assche <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello Mr. Wang,

Does the patch below make the Net-SNMP source code build ? (You can also
obtain this patch by running the command svn diff -c18565
https://net-snmp.svn.sourceforge.net/svnroot/net-snmp/branches/V5-5-patches
.)

Index: win32/net-snmp/net-snmp-config.h
===================================================================
--- win32/net-snmp/net-snmp-config.h    (revision 18564)
+++ win32/net-snmp/net-snmp-config.h    (revision 18565)
@@ -32,10 +32,15 @@
 /* #undef NETSNMP_ENABLE_IPV6 */

 /* Only use Windows API functions available on Windows 2000 SP4 or later.
- * We need at least SP1 for some IPv6 defines in ws2ipdef.h
+ * We need at least SP1 for some IPv6 defines in ws2ipdef.h.
+ * Only define _WIN32_WINNT when not being compiled with MSVC 6 without
PSDK
+ * because there is a bug in the MSVC 6 header <winsock.h> that causes
+ * inclusion of <winsock2.h>.
  */
+#if defined(HAVE_WIN32_PLATFORM_SDK) || !defined(_MSC_VER) || _MSC_VER >
1200
 #define _WIN32_WINNT 0x500 /*_WIN32_WINNT_WIN2K*/
 #define NTDDI_VERSION 0x05000400 /* NTDDI_WIN2KSP4 */
+#endif

 #define INSTALL_BASE "c:/usr"

Bart.

On Mon, Apr 26, 2010 at 7:25 AM, wdb <[email protected]> wrote:

>  Hi Bart,
>
>    Thanks for your reply, I downloaded 5.5, and the includes directory is:
> net-snmp5.5/include.
>
> Would you like to give me more detail about this?
>
> Thank you very much,
> Daobang Wang.
>
> ----- Original Message -----
> *From:* Bart Van Assche <[email protected]>
> *To:* wangdaobang <[email protected]>
> *Cc:* [email protected]
> *Sent:* Friday, April 23, 2010 6:04 PM
> *Subject:* Re: net snmp, Compile error.
>
> 2010/4/22 wangdaobang <[email protected]>
>
>>      I'm new here, would you like to help me about the net snmp compile
>> with vc6.0? the output is followed:
>> Compiling...
>> snmptest.c
>> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(49) :
>> error C2011: 'fd_set' : 'struct' type redefinition
>> [ ... ]
>>
>
> Which version of Net-SNMP have you tried to compile ? Which directories
> have been configured in MSVC 6 under Tools / Options / Directories / Include
> files ?
>
> Bart.
>
>

------------------------------------------------------------------------------

_______________________________________________
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
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.