Using the command line and nmake

From Net-SNMP Wiki
Jump to: navigation, search

Setup the build system

  • Download and install Microsoft Visual Studio 2005 Express
  • Download and install the Microsoft SDK
  • Download and install ActivePerl for the Make scripts


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 Visual Studio 8\VC\bin\vcvars32.bat
  • C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\setenv.cmd


Set the install directory variable to what net-snmp expects

  • SET MSVCDir=%VSINSTALLDIR%


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.