Compilation advice
Compiling ChmLib.dll on Windows 10
Prerequisites: Installation of Visual Studio Community 2015 or comparable. It is a free download.
- Download and extract a .zip file of ChmLib.
- Inside there is another .zip file:
ChmLib-ds6.zip. Extract that. - Open
ChmLib.dswin Visual Studio Community 2015. - Accept notice of the one-way upgrade (this project file is many years out of date).
- Back in the file explorer, copy everything from
CHMLib-master/srcinto the directoryChmLib-ds6. - Copy the modified
chm_lib.hfromdeps/chm_lib.hin this package into the directoryChmLib-ds6(overwrite the old file). - In the "Solution Explorer" of VS Community 2015, right-click on ChmLib and select Properties...
- Click Configuration Manager...
- Active solution configuration –> release
- Active solution platform –> New...
- New platform –> x64, copy settings from x86.
- Make sure that project ChmLib is configured for Release and x64. Close the Configuration Manager.
- You should be back at a window ChmLib Property Pages. In the list at the left you should select Configuration Properties -> General.
- Change Project Defaults -> Configuration Type -> Dynamic Library (.dll).
- Apply and OK.
- Right click ChmLib in Solution Explorer and choose Build.
- Verify in the output that you built Release x64 and a .dll file was generated.
- From
ChmLib-ds6\x64\Releasecopy the .dll file toC:\Windows\System32. - Enjoy
Compiling ChmLib.dylib on Mac OS X 10.11
- Download and extract a .zip file of ChmLib.
- From the Terminal, change paths to the
srcfolder inside. - Run:
gcc -c -fpic chm_lib.c chm_lib.h lzx.c lzx.h - Run:
gcc -dynamiclib -o ChmLib.dylib chm_lib.o lzx.o - Copy the resulting
ChmLib.dylibto thedepsfolder of this package. - Enjoy