In order to work with the LEADTOOLS Linux libraries and demo projects, you need to have your Linux development environment set up. Perform the following steps to set it up:
1. |
Install the Java Development Kit (JDK) 1.6 which includes the Java Runtimes (JRE) and libraries. Obtain them from http://www.oracle.com/technetwork/java/javase/downloads/index.html |
Note: Download the Linux version of the JDK.
2. |
Using Terminal, install the following required Linux libraries. Use command lines as shown in the following table: |
Package |
Command |
uuid-devel |
sudo yum install uuid-devel |
gcc |
sudo yum install gcc kernel-devel sudo yum install gcc sudo yum install gcc-c++ |
glibc-devel |
sudo yum install glibc-devel |
kernel |
sudo yum install gcc kernel-devel sudo yum install kernel-devel sudo yum install kernel-headers.x86_64 |
libX11 |
sudo yum install libX11.i686 sudo yum install libX11-devel |
xorg-x11-fonts |
sudo yum install xorg-x11-fonts* |
3. |
Create symbolic links for each required library (libX11.so, libstdc++, libuuid.so). The original libraries for these files are in either "/usr/lib" or "/usr/lib64" For example, if you are working on a 64 machine, from within Terminal run the following commands: |
cd /usr/lib64
ls libX11.*
|
A file called "libX11.so.6.3.0" would need a link named "libX11.so" for that file. To create the link, from within Terminal run the following commands: |
sudo ln sf libX11.so.6.3.0 libX11.so.6.3
sudo ln sf libX11.so.6.3 libX11.so.6
sudo ln sf libX11.so.6 libX11.so
|
Do the same for the remaining required libraries. |
4. |
Install Eclipse from http://www.eclipse.org/downloads/?osType=linux |
Note: To make sure the demo projects work properly use the Eclipse Juno (ver. 4.2) for Linux and Eclipse IDE for C/C++ Developers packages.
The download .zip file will contain the Eclipse executable and supplemental directories, but not an installer. Copy the contents to a specific folder (for example, the Home folder).
5. |
Create symbolic links for the LEADTOOLS libraries. The libraries are at /home/user/LEADTOOLS 19/Bin/Linux/x64 (the 64-bit libraries) and /home/user/LEADTOOLS 19/Bin/Linux/x32 (the 32-bit libraries). Create symbolic links for all libraries. For example, to create a symbolic link for libltkrn on a 64-bit machine, from within Terminal, run the following commands: |
cd /usr/lib64
sudo ln sf /home/user/LEADTOOLS 19/Bin/Linux/x64/libltkrn.so.19.0 libltkrn.so.19
sudo ln sf libltkrn.so.19 libltkrn.so
|
Do the same for the remaining required libraries. |
1. |
Go to the location where you extracted Eclipse and run it. |
2. |
From within Eclipse, choose File -> Import. When the Import dialog appears, select General -> Existing Project into Workspace. Click Next. |
3. |
When the Import Projects dialog appears, select the Select Root Directory radio button. Click the corresponding Browse button. Navigate to the location where you installed LEADTOOLS and browse for the demo you want to use. Click OK and then Finish to start importing the demo. |
4. |
From within Eclipse, open the Project Explorer. |
5. |
Select the project you imported. Right-click the mouse and choose Properties. Go to the C/C++ General section and select the Paths and Symbols selection.
|
|
On the Includes tab, click Add. In the Directory dialog, add "/usr/include" and click OK. |
|
On the Library Paths tab, click Add. In the Directory dialog, add ""/usr/lib64" for Linux 64-bit and "/usr/lib" for Linux 32-bit and click OK. |
6. |
From within Eclipse, open the Project Explorer again. Select the project and expand it. Select a "C" file. Right-click it with the mouse, and choose Properties. Go to the C/C++ General section and select the Paths and Symbols selection. On the Includes tab, click Add. In the Directory dialog, add "/usr/include" and click OK. Do this for each of the remaining "C" files |
7. |
Build the project and run it. |
8. |
Because the demo is a console application, pass the parameters into the Arguments tab of the Run Configuration dialog. |
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET