Getting Started with the LEADTOOLS Linux Libraries and Demo Projects - Raster Imaging C API Help

Getting Started with the LEADTOOLS Linux Libraries and Demo Projects

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

Package Name

Ubutnu

Fedora

uuid

Universally Unique Identifier library

uuid-dev

uuid-devel

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

libX11

Core X11 protocol client library

libx11-6

libX11

libX11-devel

Development files for libX11

libx11-dev

libX11-devel

sqllite

C library that implements a SQL database engine

sqlite3

sqlite

sqlite-devel

Development header files for sqlite

libsqlite-dev

sqlite-devel

libfreetype >= 2.3.8

Font rendering engine

libfreetype6

freetype

libfontconfig >= 2.8.0

Locates fonts within the system

fontconfig

fontconfig

Microsoft Core Fonts

(Optional: see note below)

Microsoft True Type Core Fonts

ttf-mscorefonts-installer

*See notes below

Notes

The Microsoft Core Fonts component is optional and is not required. 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.

Fedora

Issue the following command to install the dependencies in Fedora:

sudo dnf install uuid-devel gcc gcc-c++ glibc-devel kernel-devel kernel-headers libX11 libX11-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  

Ubuntu

Issue the following command to install the dependencies in Ubuntu:

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

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

Package Name

Ubutnu

Fedora

Java JRE

Java Runtime Environment

openjdk-7-jre

java-1.8.0-openjdk

Java JDK

Java development toolkit

openjdk-7-jdk

java-1.8.0-openjdk-devel

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 

Ubuntu

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

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

Building and Running LEADTOOLS Demos

Eclipse (Java & C/C++)

  1. In Eclipse, go to the File menu and select Import. From the Import 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/LEADTOOLS20), 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.

    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/LEADTOOLS20/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 “LEADTOOLS20/Examples/Linux/C” 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/LEADTOOLS20/Bin/Lib/<arch>. See /home/user/LEADTOOLS20/Examples/Linux/C/common.mk

    cd ~/LEADTOOLS20/Examples/Linux/C  
    make 

  2. In each demo directory, a new directory is created with the executable. An x86 directory is created for a 32-bit machine. An x64 directory is created for a 64-bit machine.

  3. For example, to run the barcode demo use the following command:

    ~/LEADTOOLS20/Examples/Linux/C$ ./Barcode/x86/Barcode -f /home/test/LEADTOOLS20/Images/barcode1.tif 

Library 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
liblvkrn
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
liblvkrn
libstdc++
libm
libgcc_s
libc

liblfdox.so

libltkrn
libltdrw
libstdc++
libm
libgcc_s
libc

liblfdwg.so

libltkrn
libltdrw
liblvkrn
libltimgclr
libstdc++
libm
libgcc_s
libc

liblfdxf.so

libltkrn
libltdrw
liblvkrn
libstdc++
libm
libgcc_s
libc

liblfe00.so

libltkrn
libltdrw
liblvkrn
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
liblvkrn
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
liblvkrn
libstdc++
libm
libgcc_s
libc

liblfnap.so

libltkrn
libltdrw
liblvkrn
libstdc++
libm
libgcc_s
libc

liblfpcl.so

libltkrn
libltdrw
liblvkrn
libltimgcor
libstdc++
libm
libgcc_s
libc

liblfpct.so

libltkrn
libltdrw
liblvkrn
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
liblvkrn
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
liblvkrn
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
liblvkrn
libltdrw
libm
libgcc_s
libc

liblvkrn.so

libltkrn
libltfil
libltimgcor
libltimgefx
libltdrw
libstdc++
libm
libgcc_s
libc

Help Version 20.0.2018.8.8
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help