I found some issues when compiling with the MSVC Workspace. Attached are the fixes.

libsnmp.def:  Cleanup - remove some duplicate entries

libsnmp_dll.dsp:  Add missing source file

netsnmpmibssdk.dsp: Remove commented source file as it MSVC complains about it.

The patch also includes an updated README.win32 which explains how to compile the apps with the DLL using the Workspace.

*This patch only affects building with the MSVC Workspace*.

Alex
Index: README.win32
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/README.win32,v
retrieving revision 5.53
diff -u -r5.53 README.win32
--- README.win32        13 Nov 2006 01:53:46 -0000      5.53
+++ README.win32        18 Nov 2006 19:54:28 -0000
@@ -19,6 +19,7 @@
 Microsoft Visual C++ - Overview
 Microsoft Visual C++ - Configure / nmake - Building
 Microsoft Visual C++ - Workspace - Building
+Microsoft Visual C++ - Workspace - Building the DLL
 Microsoft Visual C++ - Workspace - Building the Perl SNMP modules
 Microsoft Visual C++ - Workspace - Installing
 Microsoft Visual C++ - Building with OpenSSL
@@ -737,6 +738,9 @@
 
 4. Build the applications
 
+   Static build (does not use NetSNMP.DLL)
+   =======================================
+
    MS VC++ 6.0:
    ------------
    a. Open win32.dsw or win32sdk.dsw.
@@ -766,6 +770,52 @@
    l.  When building is done, View the Output window, clip and
        save to a text file if there is some information to share.
    m.  Click "File->Close Solution".
+
+   Dynamic build (uses NetSNMP.DLL)
+   ================================
+
+   Complete the section 'Microsoft Visual C++ - Workspace - Building the DLL'.
+   This will create the Net-SNMP library DLL which is needed by the 
+   applications and will enable DLL support in net-snmp-config.h.
+
+   MS VC++ 6.0:
+   ------------
+   a. Open win32.dsw or win32sdk.dsw.
+   b. Click "Build->Batch Build..."  
+   c. Set Release and/or Debug in 'Project configurations' to suit for the 
+      applications.  Make sure the following are NOT selected:
+
+      libagent
+      libhelpers
+      libsnmp
+      netsnmpmib(sdk)
+      libnetsnmptrapd
+
+   d. Click "ReBuild All".
+   e. When building is done, View the Output window, clip and
+      save to a text file if there is some information to share.
+   f. Click "File->Close Workspace".
+
+   MS VC++ 7.0+:
+   -------------
+   a. Open win32.dsw or win32sdk.dsw.
+   b. Click "Yes to All" to convert the workspace
+   c. Click "Build->Configuration Manager" and select either Release or Debug 
for 
+      'Active Solution Configuration' and click "Close"
+   d. Click "Build->Batch Build..." 
+   e. Set Release and/or Debug in 'Project configurations' to suit for the 
+      applications.  Make sure the following are NOT selected:
+
+      libagent
+      libhelpers
+      libsnmp
+      netsnmpmib(sdk)
+      libnetsnmptrapd
+
+   f. Click "Rebuild".
+   g. When building is done, View the Output window, clip and
+      save to a text file if there is some information to share.
+   h. Click "File->Close Solution".
   
 5.  If the Perl modules are required, continue with the next section:
     'Microsoft Visual C++ - Building the Perl SNMP modules'.
@@ -776,30 +826,19 @@
 
 ***************************************************************************
 *
-* Microsoft Visual C++ - Workspace - Building the Perl SNMP modules
+* Microsoft Visual C++ - Workspace - Building the DLL
 *
 ***************************************************************************
 
-The Perl modules should be compiled against the DLL version of snmplib.
-Compiling against a static version is possible, but each module will
-load it's own copy of the MIB, and sharing data between modules will
-not be possible.  For example, the conf module tests will fail.
-
-1.  Complete the section 'Microsoft Visual C++ - Building'.  This will build
-    the static version of the applications.  
-
-    Note:  SNMPD.EXE and SNMPTRAPD.EXE are required for running the tests 
-           against the SNMP Perl module.
-
-2.  Make a backup of the existing net-snmp-config.h which contains settings
-    for a static build of Net-SNMP:
+1.  Optional: Make a backup of the existing net-snmp-config.h which contains 
+    settings for a static build of Net-SNMP:
 
     Copy win32\net-snmp\net-snmp-config.h to 
     win32\net-snmp\static-config.h.
 
-3.  Open win32\net-snmp\net-snmp-config.h using a text editor.
+2.  Open win32\net-snmp\net-snmp-config.h using a text editor.
 
-4.  *Change* the following line which is located near the top of the file:
+3.  *Change* the following line which is located near the top of the file:
 
         /* #undef NETSNMP_USE_DLL */
 
@@ -807,13 +846,13 @@
 
         #define NETSNMP_USE_DLL 1
 
-5.  Make a backup of the new net-snmp-config.h which contains settings
-    for a DLL build of Net-SNMP:
+4.  Optional: Make a backup of the new net-snmp-config.h which contains 
+    settings for a DLL build of Net-SNMP:
 
     Copy win32\net-snmp\net-snmp-config.h to 
     win32\net-snmp\dll-config.h.
 
-6. Build the DLL
+5. Build the DLL
 
    MS VC++ 6.0:
    ------------
@@ -840,10 +879,33 @@
       save to a text file if there is some information to share.
    i. Click "File->Close Solution".
 
-7.  Install Net-SNMP as described in the 'Microsoft Visual C++ - Installing'
+
+***************************************************************************
+*
+* Microsoft Visual C++ - Workspace - Building the Perl SNMP modules
+*
+***************************************************************************
+
+The Perl modules should be compiled against the DLL version of snmplib.
+Compiling against a static version is possible, but each module will
+load it's own copy of the MIB, and sharing data between modules will
+not be possible.  For example, the conf module tests will fail.
+
+1.  Complete the section 'Microsoft Visual C++ - Building'.  This will build
+    the applications.  
+
+    Note:  SNMPD.EXE and SNMPTRAPD.EXE are required for running the tests 
+           against the SNMP Perl module.
+
+2.  Complete the section 'Microsoft Visual C++ - Workspace - Building the DLL'.
+    This will create the Net-SNMP library DLL which is needed for the Perl 
+    modules.  Note:  This step can be skipped if the DLL was already created
+    in step 1.
+
+3.  Install Net-SNMP as described in the 'Microsoft Visual C++ - Installing'
     section to install the applications, the DLL and the .lib files.
 
-8.  Continue with the Win32 section of the Perl README file located in 
+4.  Continue with the Win32 section of the Perl README file located in 
     perl\SNMP\README.
 
 
Index: win32/libsnmp_dll/libsnmp.def
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/win32/libsnmp_dll/libsnmp.def,v
retrieving revision 5.29
diff -u -r5.29 libsnmp.def
--- win32/libsnmp_dll/libsnmp.def       27 Oct 2006 20:19:44 -0000      5.29
+++ win32/libsnmp_dll/libsnmp.def       18 Nov 2006 19:54:29 -0000
@@ -263,6 +263,7 @@
        vacm_parse_config_access
        vacm_parse_config_group
        vacm_parse_config_view
+       vacm_parse_config_auth_access
        store_vacm
        vacm_scanGroupInit
        vacm_scanGroupNext
@@ -271,7 +272,6 @@
        vacm_scanViewInit
        vacm_scanViewNext
        vacm_checkSubtree
-       vacm_parse_config_auth_access
        snmp_synch_response_cb
        snmp_clone_varbind
        snmp_free_varbind
@@ -445,20 +445,6 @@
         netsnmp_query_walk
         netsnmp_query_getnext
         netsnmp_query_get
-        snmp_disable_syslog
-        snmp_stderrlog_status
-        sa_find_specific
-        check_rowstatus_transition
-        check_storage_transition
-        netsnmp_view_get
-        netsnmp_check_vb_rowstatus_value
-        netsnmp_check_vb_type_and_size
-        netsnmp_check_vb_type_and_max_size
-        read_config_save_objid
-        print_oid_report_enable_mibchildoid
-        netsnmp_query_walk
-        netsnmp_query_getnext
-        netsnmp_query_get
 ;IPv6        netsnmp_udp6_parse_security
 ;IPv6        netsnmp_udp6_getSecName
 ;IPv6        netsnmp_TCPIPv6Domain
Index: win32/libsnmp_dll/libsnmp_dll.dsp
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/win32/libsnmp_dll/libsnmp_dll.dsp,v
retrieving revision 5.17
diff -u -r5.17 libsnmp_dll.dsp
--- win32/libsnmp_dll/libsnmp_dll.dsp   21 Sep 2006 16:15:43 -0000      5.17
+++ win32/libsnmp_dll/libsnmp_dll.dsp   18 Nov 2006 19:54:29 -0000
@@ -298,6 +298,10 @@
 
 SOURCE=..\..\snmplib\winpipe.c
 # End Source File
+# Begin Source File
+
+SOURCE=..\..\snmplib\fd_event_manager.c
+# End Source File
 # End Group
 # Begin Group "Header Files"
 
Index: win32/netsnmpmibssdk/netsnmpmibssdk.dsp
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/win32/netsnmpmibssdk/netsnmpmibssdk.dsp,v
retrieving revision 1.19
diff -u -r1.19 netsnmpmibssdk.dsp
--- win32/netsnmpmibssdk/netsnmpmibssdk.dsp     13 Sep 2006 01:32:01 -0000      
1.19
+++ win32/netsnmpmibssdk/netsnmpmibssdk.dsp     18 Nov 2006 19:54:29 -0000
@@ -408,9 +408,5 @@
 
 SOURCE=..\..\agent\mibgroup\smux\smux.c
 # End Source File
-# Begin Source File
-
-#SOURCE=..\..\agent\mibgroup\winExtDLL.c
-# End Source File
 # End Target
 # End Project
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to