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++)
- In Eclipse, go to the File menu and select Import. From theImport dialog, select General and then select Existing Projects into Workspace. Click Next.
- 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.
- Go to Project Explorer, select the imported project, right-click the project, and select Properties, then click Run/Debug Settings -> New -> OK.
- This demo is a console application: as a result, you need to pass the parameters into the Arguments tab from the Run Configuration dialog.
- 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.
- 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>”
- Set the LD_LIBRARY_PATH variable.
- 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
- 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.mkcd ~/LEADTOOLS22/Examples/Linux/C
make
- The executable will be built to /home/user/LEADTOOLS22/Bin/Lib/.
- 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
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
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
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
liblffax
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libltimgclr
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
liblffax
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltimgclr
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libltimgcor
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltimgclr
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libstdc++
libm
libgcc_s
libc
libltkrn
liblffax
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltvkrn
libstdc++
libm
libgcc_s
libc
libltkrn
libltdrw
libltimgclr
libstdc++
libm
libgcc_s
libc
libstdc++
libpthread
libdl
librt
libltkrn
libltimgcor
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libltfil
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libltfil
libltimgcor
libltimgclr
libltsvg
libltdrw
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libfontconfig
libfreetype
libGL
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltimgutl
libltkrn
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltimgutl
libltkrn
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltimgutl
libltkrn
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libltfil
libltimgefx
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libuuid
librt
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libltfil
libltimgcor
libltimgefx
libltimgclr
libltdocwrt
libltdrw
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libltfil
liblffax
libltdrw
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libsane
libm
libgcc_s
libc
libstdc++
libpthread
libdl
libltkrn
libltfil
libltvkrn
libltdrw
libm
libgcc_s
libc
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 |