Requirements
Compiler Options
Recommended: Visual Studio 2017, 2019, or 2022Supports building for: x86, x64, arm64, and arm platforms
- Visual C++ 6.0 with Platform SDK (for x86)
- Windows Server 2003 R2 Platform SDK (for x64 and ia64)
- Standard SDK for Windows CE 5.0 (for arm/Windows CE)
Microsoft Macro Assembler
Required for optimized builds:- ml.exe - for x86 builds
- ml64.exe - for x64 builds
If using MSVC 6.0, you must configure Platform SDK directories at the top of the directories list in:Tools → Options → Directories
- Include files
- Library files
Build Configuration
Makefile Variables
The following variables can be defined when compiling:Target platform:
x64, x86, arm64, arm, or ia64Set for old compilers like MSVC 6.0
Enable dynamic linking to msvcrt.dll (default is static linking)
Building All Binaries
Open Visual Studio Command Prompt
Navigate to the source directory and initialize the Visual Studio environment:For x64 builds with Visual Studio 2022:
Other Platform Build Scripts
Use differentvcvars*.bat files from VS2022\VC\Auxiliary\Build\ for other platforms:
Building Single Binary
To compile a specific binary, navigate to its project directory and runnmake.
Example: Building 7za.exe
Other Build Targets
Build Options
Static vs Dynamic Linking
Default: Static linking to the C runtime libraryPlatform-Specific Builds
To explicitly set the platform:Output Location
Compiled binaries are typically placed in subdirectories like:_o\- For default buildsb\- For some makefile configurations
Troubleshooting
Building Without Assembler
If assembler is not available, the C versions of optimized code will be used automatically, but performance may be reduced.IDE Development
For development and debugging, you can use.dsp project files with Visual Studio:
- Open the
.dspfile in Visual Studio - Allow Visual Studio to upgrade the project if prompted
- Build using the IDE’s build commands
IDE builds are recommended for development only. Production builds should use makefiles for optimal compiler settings.
Next Steps
After building:- Test your build by running the executable
- Compare performance with official builds
- Review build customization options
See Also
- Building Overview - General build information
- Building on Linux - GCC/Clang builds
- Building on macOS - macOS builds