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 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-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

Installing Microsoft True Type Core Fonts

Issue the following command to install the dependencies in CentOS:

sudo yum install libmspack rpm-build ttmkfdir wget 

Download/install cabextract: https://centos.pkgs.org/7/epel-x86_64/cabextract-1.5-1.el7.x86_64.rpm.html

cd ~ && mkdir tmp && cd tmp 
wget "http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/c/cabextract-1.5-1.el7.x86_64.rpm" 
sudo rpm -i cabextract-1.5-1.el7.x86_64.rpm 

Download/install core fonts: http://corefonts.sourceforge.net/

wget "http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec" 
sudo rpmbuild -bb msttcorefonts-2.5-1.spec 
sudo rpm -ivh /root/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm 

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 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, 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/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. The excutable will be built to /home/user/LEADTOOLS20/Bin/Lib/<arch>.

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

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

Library Dependencies

Dependencies
libleadtools.barcode.datamatrixread.so
libleadtools.barcode.datamatrixwrite.so
libleadtools.barcode.lead2dread.so
libleadtools.barcode.lead2dwrite.so
libleadtools.barcode.oned.so
libleadtools.barcode.pdfread.so
libleadtools.barcode.pdfwrite.so
libleadtools.barcode.qrread.so
libleadtools.barcode.qrwrite.so
liblfbmp.so
liblfcal.so
liblfcgm.so
liblfcmp.so
liblfcmw.so
liblfcmx.so
liblfdox.so
liblfdwg.so
liblfdxf.so
liblfe00.so
liblfeps.so
liblffax.so
liblfgbr.so
liblfgif.so
liblfica.so
liblfimg.so
liblfj2k.so
liblfjb2.so
liblfjbg.so
liblfjls.so
liblfjxr.so
liblflmb.so
liblfmif.so
liblfnap.so
liblfpcl.so
liblfpct.so
liblfpcx.so
liblfpng.so
liblfppx.so
liblfpsd.so
liblfraw.so
liblfshp.so
liblftif.so
liblftxt.so
liblfvpg.so
liblfxlx.so
libltbar.so
libltclr.so
libltdic.so
libltdictables.so
libltdocwrt.so
libltdrw.so
libltfil.so
libltimgclr.so
libltimgcor.so
libltimgefx.so
libltimgutl.so
libltjp2.so
libltkrn.so
libltocr.so
libltpdf.so
libltsane.so
libltsvg.so
liblvkrn.so

Help Version 20.0.2019.12.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help