How to compile 7-zip components
During my work on this documentation, I compiled the File Manager to be able to see the call stack and to debug the plugin system. This guide will allow you to compile any components you want to explore.
- Navigate to the
CPPfolder and findBuild.mak. This is the base make file that is referenced by the other components. Open it. - Find the line
CFLAGS = $(CFLAGS) -nologoand add the/Zicompiler flag at the end (It instructs the compiler to create a symbols file). - Find the line
LFLAGS = $(LFLAGS) -nologo -OPT:REF -OPT:ICF -INCREMENTAL:NOand add the/DEBUGlinker flag. - Find the lines
CFLAGS_O1andCFLAGS_O2, and disable the optimization flags-Oxby replacing them with-Od. - Go to any component you want to compile. For example,
CPP\7zip\UI\FileManager\. Open the Visual Studio console there and typenmake. It should work without parameters. - The build process will create an
x64folder. Open it and find the required component. Copy it to the installed 7-zip version. Done.