-
Notifications
You must be signed in to change notification settings - Fork 560
Windows build
These instructions show how to build Tesseract for Windows using a build standard based on the GNU autotools. Other methods use cmake with either the GNU compiler or Microsoft Visual Studio. Those other methods are not covered here.
Cross building means that we compile on Linux, but the resulting programs will run on Windows. This is our preferred way to build Tesseract for Windows because it is much faster than a native build on Windows. The instructions here are for Debian GNU Linux, but also work for other Debian based Linux distributions like for example Ubuntu. Other Linux distributions need more or less modifications of these instructions.
Several packages are needed to allow builds with the GNU autotools. Let's make sure that we have installed them:
apt install TODO
In addition, we need the cross tools for building Windows programs:
apt install TODO
Finally, several pre-compiled libraries for Windows are needed. Those libraries are not part of Debian GNU Linux, so we use Cygwin packages which were converted to Debian packages. TODO.
dpkg -i TODO
cd $HOME
mkdir -p src/github/DanBloomberg
cd src/github/DanBloomberg
git clone git@github.com:DanBloomberg/leptonica.git
cd leptonica
./autobuild
mkdir -p bin/ndebug/i686-w64-mingw32
cd bin/ndebug/i686-w64-mingw32
../../../configure --host=i686-w64-mingw32 --prefix=/usr/i686-w64-mingw32 CFLAGS='-Wall -Wextra -pedantic -g -O2'
make
sudo make install
TODO.