目录
1.下载
或者点击全部下载
2. 编译tesseract
2.1 编译基础依赖库
这里只编译release版本的,debug或者32位的可参考自行编译。
2.1.1 zlib
解压后,调用cmake ,输入相关路径,点击【configure】如图:
配置编译环境(这里都是x64为例,后续不再复缀),然后点击【finish】
点击【generate】
点击【open project】, 打开VS,
编译成功
2.1.2 jpegsr9f
解压后使用 VS 工具,进入项目所在目录, 输入 NMAKE /f makefile.vc setup-v16 (vs2022 其余版本命令自行查找)生成项目
开发人员命令提示符 - 将环境设置为使用 32 位 x86 本机工具生成 32 位 x86 本机代码。
x86 本机工具命令提示符 - 将环境设置为使用 32 位 x86 本机工具生成 32 位 x86 本机代码。
x64 本机工具命令提示符 - 将环境设置为使用 64 位 x64 本机工具生成 64 位 x64 本机代码。
x86_x64 兼容工具命令提示符 - 将环境设置为使用 32 位 x86 本机工具生成 64 位 x64 本机代码。
x64_x86 兼容工具命令提示符 - 将环境设置为使用 64 位 x64 本机工具生成 32 位 x86 本机代码。
解决1:
可以先用everything查找,没有,创建构建我win32.mak文件,内容如下:
# Win32.Mak - Win32 application master NMAKE definitions file for the
# Microsoft Windows SDK programming samples
# Copyright (C) Microsoft Corporation
# -------------------------------------------------------------------------
# This files should be included at the top of all MAKEFILEs as follows:
# !include <Win32.Mak>
# -------------------------------------------------------------------------
#
# Define APPVER = [ 4.0 | 5.0 | 5.01 | 5.02 | 6.0 | 6.1] prior to including win32.mak to get
# build time checking for version dependencies and to mark the executable
# with version information.
#
# Define TARGETOS = [ WIN95 | WINNT | BOTH ] prior to including win32.mak
# to get some build time checking for platform dependencies.
#
# Define TARGETLANG = [ LANG_JAPANESE | LANG_CHINESE | LANG_KOREAN ] prior
# to including win32.mak to getcompile & link flags for building
# applications to run on Far-East Windows. (This is an optional parameter.
# The system locale is the default.)
#
# Define _WIN32_IE = [ 0x0300 | 0x0400 | 0x0500 | 0x0600 | 0x0700 | 0x0800] prior to including win32.mak to
# get compile and link flags for building applications and components to
# run on Internet Explorer. (This is an optional parameter. IE 4.0 is
# the default.)
#
# -------------------------------------------------------------------------
# NMAKE Options
#
# Use the table below to determine the additional options for NMAKE to
# generate various application debugging, profiling and performance tuning
# information.
#
# Application Information Type Invoke NMAKE
# ---------------------------- ------------
# For No Debugging Info nmake nodebug=1
# For Working Set Tuner Info nmake tune=1
# For Call Attributed Profiling Info nmake profile=1
#
# Note: The three options above are mutually exclusive (you may use only
# one to compile/link the application).
#
# Note: creating the environment variables NODEBUG, TUNE, and PROFILE is an
# alternate method to setting these options via the nmake command line.
#
# Note: TUNE and PROFILE do nothing for 64bit compilation
#
# Additional NMAKE Options Invoke NMAKE
# ---------------------------- ------------
# For No ANSI NULL Compliance nmake no_ansi=1
# (ANSI NULL is defined as PVOID 0)
#
# =========================================================================
# Build Rules Quick Start
#
# To build one of the following types of executables, use the specified
# compiler and linker command-line options.
#
# ---------------------------------------------------------------------------
# To build: | Compiler Options | Linker options (pick one
# | | line. con = console,
# | | gui = GUI, ole = GUI OLE)
# ---------------------------------------------------------------------------
# Single threaded | cdebug cflags cvars | ldebug guilflags guilibs
# app with static | | ldebug conlflags conlibs
# CRT | | ldebug guilflags olelibs
# ---------------------------------------------------------------------------
# Multithreaded app | cdebug cflags cvarsmt | ldebug guilflags guilibsmt
# with static CRT | | ldebug conlflags conlibsmt
# | | ldebug guilflags olelibsmt
# ---------------------------------------------------------------------------
# Single or multi- | cdebug cflags cvarsdll | ldebug guilflags guilibsdll
# threaded app with | | ldebug conlflags conlibsdll
# DLL version of CRT | | ldebug guilflags olelibsdll
# (MSVCRT.DLL) | |
# ---------------------------------------------------------------------------
# DLL with static | cdebug cflags cvarsmt | ldebug dlllflags guilibsmt
# CRT* | | ldebug dlllflags conlibsmt
# | | ldebug dlllflags olelibsmt
# ---------------------------------------------------------------------------
# DLL with DLL | cdebug cflags cvarsdll | ldebug dlllflags guilibsdll
# version of CRT | | ldebug dlllflags conlibsdll
# (MSVCRT.DLL) | | ldebug dlllflags olelibsdll
# ---------------------------------------------------------------------------
#
# * Always make DLLs multithreaded because a DLL has no way to know whether
# the calling application has multiple threads, and has no way to prevent
# multithreaded apps from loading it.
#
# To specify an Intel x86 build that defaults to stdcall, add scall to the
# list of compiler options.
#
# =================================&