LSB Eclipse Plugin Getting Started
From ISP_RAS
This document describes the general steps to get started with the LSB Eclipse Plugin.
[edit]
System requirements
- Eclipse version 3.3.1.1 or higher (3.4 is preferrable) for Linux platform: http://www.eclipse.org/downloads/
- Java Runtime Environment (JRE) version 1.5.0 or higher (1.6.0 is preferrable) for Linux platform: http://java.sun.com/javase/downloads/index.jsp
- C Development Tools (CDT) version 4.0 or higher (5.0 is preferrable): http://www.eclipse.org/cdt/downloads.php (alternatively you can use the integrated Eclipse IDE for C/C++ Developers)
- GCC Toolchain (included as optional tool in CDT)
- LSB SDK: http://linuxfoundation.org/en/Downloads
- Linux Application Checker version 2.0.0 or higher: http://ispras.linuxfoundation.org/index.php/Linux_App_Checker_Releases (only version for non-roots is supported currently)
[edit]
Installation and uninstallation
To install or uninstall plug-in please use LSB Eclipse Plugin Update Site
[edit]
Usage
- Creating new LSB projects
Creating a new LSB C/C++ project is similar to creating a usual C/C++ Eclipse project:- select "File -> New -> Project", select "C Project" (or "C++ Project"),
- enter project name,
- select project type ("Executable", "Shared Library" or "Static Library"),
- make sure that "LSB Toolchain" is selected in the "Toolchain" list-box,
- press "Finish".
The new project will be compiled using the lsbcc/lsbc++ compilers from LSB SDK with the "LSB Version" option set to default. If you want to change this option to another one, see the next item.
- Changing the LSB target version
To build application that satisfies the previous LSB standards, set the appropriate value for the "LSB Version" option in the project's settings:- select your project,
- select "Project -> Properties" from the main menu,
- expand the "C/C++ Build" outline tree node within the resulting dialog, select "Settings",
- in the "Tool Settings" page select the "LSB Settings" category,
- in the "LSB Version" combo-box select the target LSB version,
- finally, apply changes, close the dialog and rebuild the project.
- Converting existing projects
If you have already a standard project with "Linux GCC" toolchain, you can change it to "LSB Toolchain". To do so:- select your project,
- select "Project -> Properties" from the main menu,
- expand the "C/C++ Build" outline tree node within the resulting dialog, select "Tool Chain Editor",
- in the "Current toolchain" combo-box select "LSB Toolchain" item,
- finally, apply changes, close the dialog and rebuild the project.
- Checking your application
Linux Application Checker allows you to test your applications for cross-distro compatibility, as well as for LSB compliance. To check the application:- select your project,
- select "LSB -> Check selected projects with Linux App Checker" main menu item.
- Also this command can be called from the project popup menu or via toolbar button.
Please note, that the App Checker Server should be running. If it is not started, please run the following command:
$ <path_to_app_checker>/bin/app-checker-start.pl
Note: this function is available only in "C/C++" perspective and not applicable for static libraries.
The result of this check will be opened in the internal browser on a new tab of Source Editor.