Difference between revisions of "Using the command line and nmake (VC++ 2010 Express)"
From Net-SNMP Wiki
(Created page with "'''Setup the build system''' *Download and install Microsoft Visual C++ 2008 Express [http://go.microsoft.com/fwlink/?LinkId=104679] *Download and install Microsoft Visual C++...") |
|||
Line 3: | Line 3: | ||
*Download and install Microsoft Visual C++ 2010 Express [http://www.visualstudio.com/downloads/download-visual-studio-vs#DownloadFamilies_4] | *Download and install Microsoft Visual C++ 2010 Express [http://www.visualstudio.com/downloads/download-visual-studio-vs#DownloadFamilies_4] | ||
*Download and install Windows SDK v7.1 [http://www.microsoft.com/en-us/download/details.aspx?id=8279] | *Download and install Windows SDK v7.1 [http://www.microsoft.com/en-us/download/details.aspx?id=8279] | ||
− | |||
*Download and install ActivePerl v.5.16.3.1604 ('''''x64''''') for the Make scripts and/or Perl Net-SNMP modules [http://www.activestate.com/activeperl/downloads] | *Download and install ActivePerl v.5.16.3.1604 ('''''x64''''') for the Make scripts and/or Perl Net-SNMP modules [http://www.activestate.com/activeperl/downloads] | ||
+ | *Download Net-SNMP v5.7.2.1 ZIP, '''''extract to path without spaces''''' (e.g. C:\projects\net-snmp-5.7.2.1) | ||
<br> | <br> | ||
'''Build Net-SNMP'''<br> | '''Build Net-SNMP'''<br> | ||
Line 11: | Line 11: | ||
<br> | <br> | ||
Set the environment variables for Visual Studio as well as the SDK '''''(modify paths to match your install locations)''''' | Set the environment variables for Visual Studio as well as the SDK '''''(modify paths to match your install locations)''''' | ||
− | + | *C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\setenv.cmd /release /x64 | |
− | *C:\Program Files\Microsoft SDKs\Windows\ | + | |
<br> | <br> | ||
− | Set the install directory variable to what | + | Set the install directory variable to what Net-SNMP expects |
*SET MSVCDir=%VSINSTALLDIR% | *SET MSVCDir=%VSINSTALLDIR% | ||
+ | Append the following environment variables to include OpenSSL headers and libraries | ||
+ | *SET INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\gl;C:\OpenSSL\include | ||
+ | *SET LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\X64;C:\OpenSSL\lib\VC | ||
<br> | <br> | ||
Run the build script | Run the build script |
Revision as of 17:08, 10 November 2014
Setup the build system
- Download and install Microsoft Visual C++ 2008 Express [1]
- Download and install Microsoft Visual C++ 2010 Express [2]
- Download and install Windows SDK v7.1 [3]
- Download and install ActivePerl v.5.16.3.1604 (x64) for the Make scripts and/or Perl Net-SNMP modules [4]
- Download Net-SNMP v5.7.2.1 ZIP, extract to path without spaces (e.g. C:\projects\net-snmp-5.7.2.1)
Build Net-SNMP
Open a command prompt with the correct options:
- cmd /V:ON /E:ON
Set the environment variables for Visual Studio as well as the SDK (modify paths to match your install locations)
- C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\setenv.cmd /release /x64
Set the install directory variable to what Net-SNMP expects
- SET MSVCDir=%VSINSTALLDIR%
Append the following environment variables to include OpenSSL headers and libraries
- SET INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\gl;C:\OpenSSL\include
- SET LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\X64;C:\OpenSSL\lib\VC
Run the build script
- c:\net-snmp\win32\build.bat
Common Issues
- "This application ahs failed to start because MSVCR80.dll was not found. Re-installing the applcation may fix this problem."
- This error is related to the MS Visual C++ Redistributable Package. Generally you can remedy this issue by runing vcredist_x86.exe (MS Visual C++ Redistributable Package) on the target system.