Getting Started with the LEADTOOLS Linux Libraries and Demo Projects (original) (raw)

Native Dependencies

The following table shows all the third-party native dependencies used by LEADTOOLS. To determine which libraries require these dependencies, refer to the list at the end of this document. A table showing which LEADTOOLS library supports which features can be found here.

Library Description Ubuntu Package Name Fedora Package Name
uuid Universally Unique Identifier library uuid-dev uuid-devel
uuid-runtime uuidd
gcc GNU compiler collection gcc gcc
g++ GNU C++ compiler g++ gcc-c++
glibc-devel Standard C library libc-dev-bin glibc-devel
kernel kernel development libraries and headers linux-libc-dev kernel-devel kernel-headers
X11 Core X11 protocol client library libx11-6 libX11
libxt6 libXt
X11-devel Development files for libX11 libx11-dev libX11-devel
libxt-dev libXt-devel
sqllite C library that implements a SQL database engine sqlite3 sqlite
sqlite-devel Development header files for sqlite libsqlite-dev sqlite-devel
freetype >= 2.3.8 Font rendering engine libfreetype6 freetype
fontconfig >= 2.8.0 Locates fonts within the system fontconfig fontconfig
Microsoft Core Fonts. See Notes below. Microsoft True Type Core Fonts ttf-mscorefonts-installer See Installing Microsoft True Type Core Fonts below

Notes

The LEADTOOLS OCR, Documents format readers, and Documents format writers modules will try to create fonts during their operation. If a needed font, such as "Arial" or "Times New Roman" is not found on the system, the module will substitute a different font. If an exact match for the module output between Windows and Linux is required, then the Microsoft Core Fonts component must be installed.

Ubuntu

Issue the following command to install the dependencies in Ubuntu:

sudo apt update && sudo apt-get install uuid-dev uuid-runtime gcc g++ libc-dev-bin linux-libc-dev libx11-6 libx11-dev libxt6 libxt-dev sqlite3 libsqlite3-dev libfreetype6 fontconfig ttf-mscorefonts-installer

Fedora

Issue the following command to install the dependencies in Fedora:

sudo dnf install uuid-devel uuidd gcc gcc-c++ glibc-devel kernel-devel kernel-headers libX11 libX11-devel libXt libXt-devel sqlite sqlite-devel freetype fontconfig  

Installing Microsoft True Type Core Fonts

Issue the following commands to install Microsoft TrueType Core Fonts:

sudo dnf install rpm-build cabextract ttmkfdir wget cd ~ && mkdir tmp && cd tmp wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec sudo rpmbuild -bb msttcorefonts-2.5-1.spec sudo dnf install /root/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm

CentOS

Issue the following commands to install the dependencies in CentOS

sudo yum update -y sudo yum install libuuid libuuid-devel uuidd gcc gcc-c++ glibc-devel kernel-devel kernel-headers libX11 libXt libX11-devel libXt-devel sqlite sqlite-devel freetype fontconfig -y

Java Dependencies

Install the Java Development Kit (JDK) and Java Runtimes (JRE). A table of LEADTOOLS JAR files and their native dependencies can be found here.

Library Description Ubuntu Package Name Fedora Package Name
Java JRE Java Runtime Environment openjdk-8-jre java-1.8.0-openjdk
Java JDK Java development toolkit openjdk-8-jdk java-1.8.0-openjdk-devel

Ubuntu

Issue the following command to install the Java Development Kit and Java Runtimes in Ubuntu:

sudo apt-get install openjdk-8-jre openjdk-8-jdk 

Fedora

Issue the following command to install the Java Development Kit and Java Runtimes in Fedora:

sudo dnf install java-1.8.0-openjdk java-1.8.0-openjdk-devel 

Building and Running LEADTOOLS Demos

Setting a Runtime License

LEADTOOLS requires a runtime license file and developer key.
For more information see Setting a Runtime License

Eclipse (Java & C/C++)

  1. In Eclipse, go to the File menu and select Import. From theImport dialog, select General and then select Existing Projects into Workspace. Click Next.
    Existing Projects into Workspace
  2. In the Import Projects dialog box, select Select root directory and then click Browse. Go to the location where the toolkit is installed (/home/user/LEADTOOLS22), and browse for the demo to be used, click OK, and then click Finish.
    Import Projects Dialog Box
  3. Go to Project Explorer, select the imported project, right-click the project, and select Properties, then click Run/Debug Settings -> New -> OK.
    Properties
  4. This demo is a console application: as a result, you need to pass the parameters into the Arguments tab from the Run Configuration dialog.
    The Run Configuration Dialog Box
  5. For the C demos, set a path for the executable to search for the LEADTOOLS libraries at runtime. There are two ways to do this (use either one).
    • Set the LD_LIBRARY_PATH variable.
      The LD_LIBRARY_PATH Method
    • Set the rpath of the executable as follows: Go to Project > Properties > C/C++ Build > Settings > Miscellaneous > Other options and add
      -rpath “/home/user/LEADTOOLS22/Bin/Lib/<platform>”
      The rpath Method
  6. Build the project and run it.

Make (C/C++)

As an alternative to using Eclipse for the C demos, LEAD also ships standalone make files. Perform the following steps to use make files

  1. Navigate to the “LEADTOOLS22_Linux/Examples/Common/Linux” directory on a terminal. This will build all demos.
    NOTE: The make file sets the rpath for each demo executable to the absolute path of the /home/user/LEADTOOLS22/Bin/Lib/. See /home/user/LEADTOOLS22/Examples/Linux/C/common.mk
    cd ~/LEADTOOLS22/Examples/Linux/C
    make
  2. The executable will be built to /home/user/LEADTOOLS22/Bin/Lib/.
  3. For example, to run the barcode demo use the following command:
~/LEADTOOLS22/Examples/Linux/C$ ../../../Bin/Lib/x86/Barcode -i /home/test/LEADTOOLS22/Images/barcode1.tif  

Library Dependencies

Dependencies

libleadtools.barcode.datamatrixread.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

libleadtools.barcode.datamatrixwrite.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

libleadtools.barcode.lead2dread.so

libstdc++

libpthread

libdl

libltkrn

libltimgcor

libm

libgcc_s

libc

libleadtools.barcode.lead2dwrite.so

libstdc++

libpthread

libdl

libltkrn

libltimgcor

libm

libgcc_s

libc

libleadtools.barcode.oned.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

libleadtools.barcode.pdfread.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

libleadtools.barcode.pdfwrite.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

libleadtools.barcode.qrread.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

libleadtools.barcode.qrwrite.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

liblfbmp.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfcal.so

libltkrn

liblffax

libstdc++

libm

libgcc_s

libc

liblfcgm.so

libltkrn

libltdrw

libltvkrn

libstdc++

libm

libgcc_s

libc

liblfcmp.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfcmw.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfcmx.so

libltkrn

libltdrw

libltvkrn

libstdc++

libm

libgcc_s

libc

liblfdox.so

libltkrn

libltdrw

libstdc++

libm

libgcc_s

libc

liblfdwg.so

libltkrn

libltdrw

libltvkrn

libltimgclr

libstdc++

libm

libgcc_s

libc

liblfdxf.so

libltkrn

libltdrw

libltvkrn

libstdc++

libm

libgcc_s

libc

liblfe00.so

libltkrn

libltdrw

libltvkrn

libstdc++

libm

libgcc_s

libc

liblfeps.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblffax.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfgbr.so

libltkrn

libltdrw

libltvkrn

libstdc++

libm

libgcc_s

libc

liblfgif.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfica.so

libltkrn

liblffax

libstdc++

libm

libgcc_s

libc

liblfimg.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfj2k.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfjb2.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfjbg.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfjls.so

libltkrn

libltimgclr

libstdc++

libm

libgcc_s

libc

liblfjxr.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblflmb.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfmif.so

libltkrn

libltdrw

libltvkrn

libstdc++

libm

libgcc_s

libc

liblfnap.so

libltkrn

libltdrw

libltvkrn

libstdc++

libm

libgcc_s

libc

liblfpcl.so

libltkrn

libltdrw

libltvkrn

libltimgcor

libstdc++

libm

libgcc_s

libc

liblfpct.so

libltkrn

libltdrw

libltvkrn

libstdc++

libm

libgcc_s

libc

liblfpcx.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfpng.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfppx.so

libltkrn

libltdrw

libltimgclr

libstdc++

libm

libgcc_s

libc

liblfpsd.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfraw.so

libltkrn

libstdc++

libm

libgcc_s

libc

liblfshp.so

libltkrn

libltdrw

libltvkrn

libstdc++

libm

libgcc_s

libc

liblftif.so

libltkrn

liblffax

libstdc++

libm

libgcc_s

libc

liblftxt.so

libltkrn

libltdrw

libstdc++

libm

libgcc_s

libc

liblfvpg.so

libltkrn

libltdrw

libltvkrn

libstdc++

libm

libgcc_s

libc

liblfxlx.so

libltkrn

libltdrw

libltimgclr

libstdc++

libm

libgcc_s

libc

libltbar.so

libstdc++

libpthread

libdl

librt

libltkrn

libltimgcor

libm

libgcc_s

libc

libltclr.so

libstdc++

libpthread

libdl

libltkrn

libltfil

libm

libgcc_s

libc

libltdic.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

libltdictables.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

libltdocwrt.so

libstdc++

libpthread

libdl

libltkrn

libltfil

libltimgcor

libltimgclr

libltsvg

libltdrw

libm

libgcc_s

libc

libltdrw.so

libstdc++

libpthread

libdl

libltkrn

libfontconfig

libfreetype

libGL

libm

libgcc_s

libc

libltfil.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

libltimgclr.so

libstdc++

libpthread

libdl

libltimgutl

libltkrn

libm

libgcc_s

libc

libltimgcor.so

libstdc++

libpthread

libdl

libltimgutl

libltkrn

libm

libgcc_s

libc

libltimgefx.so

libstdc++

libpthread

libdl

libltimgutl

libltkrn

libm

libgcc_s

libc

libltimgutl.so

libstdc++

libpthread

libdl

libltkrn

libm

libgcc_s

libc

libltjp2.so

libstdc++

libpthread

libdl

libltkrn

libltfil

libltimgefx

libm

libgcc_s

libc

libltkrn.so

libstdc++

libpthread

libdl

libuuid

librt

libm

libgcc_s

libc

libltocr.so

libstdc++

libpthread

libdl

libltkrn

libltfil

libltimgcor

libltimgefx

libltimgclr

libltdocwrt

libltdrw

libm

libgcc_s

libc

libltpdf.so

libstdc++

libpthread

libdl

libltkrn

libltfil

liblffax

libltdrw

libm

libgcc_s

libc

libltsane.so

libstdc++

libpthread

libdl

libltkrn

libsane

libm

libgcc_s

libc

libltsvg.so

libstdc++

libpthread

libdl

libltkrn

libltfil

libltvkrn

libltdrw

libm

libgcc_s

libc

libltvkrn.so

libltkrn

libltfil

libltimgcor

libltimgefx

libltdrw

libstdc++

libm

libgcc_s

libc

Minimum Linux Versions Required

The following are the minimum versions required by the LEADTOOLS22 toolkit:

OS Version
CentOS 7.9
Fedora 23
Ubuntu 16.04
Debian 9