Hi all ..
This is my first post to these mailing lists. I hope I am following the normal etiquette here.
I had 2 questions :
1. IPv6 support
In your website home page, you have mentioned that IPv6 is supported. Is it supported on all platforms ? Has it been tested reasonably ?
2. Build errors with integration.
I donwloaded the latest source code base of net-snmp (5.1.3) and am trying to build on Windows 32 bit using VC7.0 compiler and Platform SDK Feb 2003. I require only the dynamic library (netsnmp.dll) for my project. So, I am building only the dynamic libraries. The dlls build fine without any errors. :)
But when I try to compile net-snmp with another component of mine, I am getting build errors. The only file that I include from netsnmp is net-snmp/library/libsnmp.h (from include directory). It first complained about missing net-snmp-config.h. This I copied from win32/net-snmp directory to include/net-snmp directory.
Here are the errors :
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(21) : error C2039: 'netsnmp_calloc' : is not a member of 'operator``global namespace'''
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(21) : error C2873: 'netsnmp_calloc' : symbol cannot be used in a using-declaration
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(22) : error C2039: 'netsnmp_free' : is not a member of 'operator``global namespace'''
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(22) : error C2873: 'netsnmp_free' : symbol cannot be used in a using-declaration
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(23) : error C2039: 'netsnmp_malloc' : is not a member of 'operator``global namespace'''
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(23) : error C2873: 'netsnmp_malloc' : symbol cannot be used in a using-declaration
C:\Program Files\Microsoft Visua l Studio .NET 2003\Vc7\include\cstdlib(25) : error C2039: 'netsnmp_realloc' : is not a member of 'operator``global namespace'''
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(25) : error C2873: 'netsnmp_realloc' : symbol cannot be used in a using-declaration
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(21) : error C2873: 'netsnmp_calloc' : symbol cannot be used in a using-declaration
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(22) : error C2039: 'netsnmp_free' : is not a member of 'operator``global namespace'''
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(22) : error C2873: 'netsnmp_free' : symbol cannot be used in a using-declaration
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(23) : error C2039: 'netsnmp_malloc' : is not a member of 'operator``global namespace'''
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(23) : error C2873: 'netsnmp_malloc' : symbol cannot be used in a using-declaration
C:\Program Files\Microsoft Visua l Studio .NET 2003\Vc7\include\cstdlib(25) : error C2039: 'netsnmp_realloc' : is not a member of 'operator``global namespace'''
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdlib(25) : error C2873: 'netsnmp_realloc' : symbol cannot be used in a using-declaration
error C3861: 'netsnmp_free': identifier not found, even with argument-dependent lookup
error C3861: 'netsnmp_free': identifier not found, even with argument-dependent lookup
error C3861: 'netsnmp_free': identifier not found, even with argument-dependent lookup
error C3861: 'netsnmp_free': identifier not found, even with argument-dependent lookup
error C3861: 'netsnmp_free': identifier not found, even with argument-dependent lookup
error C3861: 'netsnmp_free': identifier not found, even with argument-dependent lookup
error C3861: 'netsnmp_free': identifier not found, even with argument-dependent lookup
When I looked at the generated net-snmp-config.h, I saw the following (lines 1515-1554):
/* Define NETSNMP_USE_DLL when building or using netsnmp.DLL */
#define NETSNMP_USE_DLL 1
#define NETSNMP_USE_DLL 1
#ifdef NETSNMP_USE_DLL
#ifdef NETSNMP_DLL
#if defined(_MSC_VER)
#define NETSNMP_IMPORT __declspec(dllexport)
#endif
#else
#if defined(_MSC_VER)
#define NETSNMP_IMPORT __declspec(dllimport)
#endif
#endif /* NETSNMP_DLL */
#endif /* NETSNMP_USE_DLL */
#ifdef NETSNMP_DLL
#if defined(_MSC_VER)
#define NETSNMP_IMPORT __declspec(dllexport)
#endif
#else
#if defined(_MSC_VER)
#define NETSNMP_IMPORT __declspec(dllimport)
#endif
#endif /* NETSNMP_DLL */
#endif /* NETSNMP_USE_DLL */
/*
* DLL decoration, if used at all, must be consistent.
* This is why NETSNMP_IMPORT is really an export decoration
* when it is encountered in a header file that is included
* during the compilation of a library source file.
* NETSNMP_DLL is set by the MSVC libsnmp_dll project
* in order to signal that the library sources are being compiled.
* Not defining NETSNMP_USE_DLL ignores the preceding, and renders
* the NETSNMP_IMPORT definitions harmless.
*/
* DLL decoration, if used at all, must be consistent.
* This is why NETSNMP_IMPORT is really an export decoration
* when it is encountered in a header file that is included
* during the compilation of a library source file.
* NETSNMP_DLL is set by the MSVC libsnmp_dll project
* in order to signal that the library sources are being compiled.
* Not defining NETSNMP_USE_DLL ignores the preceding, and renders
* the NETSNMP_IMPORT definitions harmless.
*/
#ifdef NETSNMP_USE_DLL
#ifndef NETSNMP_TOOLS_C
/* wrap alloc functions to use DLL's memory heap */
/* This is not done in tools.c, where these wrappers are defined */
/* This is not done in tools.c, where these wrappers are defined */
#define strdup netsnmp_strdup
#define calloc netsnmp_calloc
#define malloc netsnmp_malloc
#define realloc netsnmp_realloc
#define free netsnmp_free
#endif
#endif
#define calloc netsnmp_calloc
#define malloc netsnmp_malloc
#define realloc netsnmp_realloc
#define free netsnmp_free
#endif
#endif
The above lines are creating a problem for me. The only way I could get around this problem is to manually comment out the line "#define NETSNMP_USE_DLL 1". Doing this results in a successful build though I am not able to successfully run. (I am still looking into this)
I would appreciate some answers from you guys ..
Thanks,
Ganesh
(PS : Reposting to users group since I didn't get any response from coders list)
Start your day with Yahoo! - make it your home page