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
CPP
folder and findBuild.mak
. This is the base make file that is referenced by the other components. Open it. - Find the line
CFLAGS = $(CFLAGS) -nologo
and add the/Zi
compiler flag at the end (It instructs the compiler to create a symbols file). - Find the line
LFLAGS = $(LFLAGS) -nologo -OPT:REF -OPT:ICF -INCREMENTAL:NO
and add the/DEBUG
linker flag. - Find the lines
CFLAGS_O1
andCFLAGS_O2
, and disable the optimization flags-Ox
by 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
x64
folder. Open it and find the required component. Copy it to the installed 7-zip version. Done.