#1 2014-05-21 01:12:58


Compiling Tesseract in Windows (tutorial)

(Yes yes I know linux = master race we'll leave that argument for another thread.)

You'll need TDM-GCC and Codeblocks, hopefully installed in that order.
TDM-GCC can be downloaded here: http://tdm-gcc.tdragon.net/download, you want the 64bit version (second link on that page)
CodeBlocks can be gotten for windows here: http://www.codeblocks.org/downloads/26#windows, you want the first link, the codeblocks installer.

Once they are both installed, launch codeblocks. Click open an existing project, select ...src/vcpp/tesseract.cbp

The whole source should load, you can edit files and whatnot in codeblocks, or use your own text editor, whatever. At the top, click Build -> Build (or ctrl-f9) and you can see in the log at the bottom that it's compiling, might take a few minutes. It'll have some blue text that says its done when its done, if it worked, when you run tesseract.bat the new version or mod or whatever you did will be there and built.

Last edited by Teh_Bucket (2014-05-21 01:16:41)


#2 2018-12-22 13:18:49


Re: Compiling Tesseract in Windows (tutorial)

Ehh, you forgot about Visual Studio (Code::Blocks + GCC is for Linux). :)

That's too able, but bad for Windows lovers, Microsoft made their free edition on VS.

But, you need VS2015 or lower, it cannot compile on 2017.


#3 2019-08-05 01:39:43


Re: Compiling Tesseract in Windows (tutorial)

Any idea where to find VS2015????


#4 2019-08-07 20:24:11


Re: Compiling Tesseract in Windows (tutorial)

Just in case, for anyone going the CodeBlocks (no mingw) + TDM-GCC route, go to the menu bar:

1) Settings > Compiler
2) "Toolchain executables" tab, ensure the following:

Compiler's installation directory: C:\Program Files (x86)\CodeBlocks\TDM-GCC-64 (this is an example)

C compiler: x86_64-w64-mingw32-gcc.exe
C++ compiler: x86_64-w64-mingw32-g++.exe
Linker for dynamic libs: x86_64-w64-mingw32-g++.exe
Linker for static libs: ar.exe
Resource compiler: windres.exe
Make program: mingw32-make.exe

3) "Build options" tab, ensure the following:

Number of processes for parallel builds: (as many threads as your CPU allows, this is to make compiling faster)

4) (optional) "Other settings" tab:

Compiler logging: Task description (less clutter in the logs compared to full command line which no one really reads)

Last edited by RaZgRiZ (2020-06-05 05:28:39)


Board footer