This procedure does not actually yield a viable shared object. It is provided here only as a reference.
NI provides a cross-compiler for their Real-Time (RT) Linux distribution. Before proceeding, download and install the C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition 2017. It is also best to review the Getting Stared with C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition guide for more general information about configuring the internal builder.
- Start NI Eclipse. A Workspace Launcher dialog may appear. Use the default.
- A welcome screen may appear after the application has loaded. Close the welcome screen.
- Right-click in the Project Explorer on the left and select Import from the context menu that appears. A new dialog will appear.
- Select
Git->Projects from Git
from the dialog that appears. Click the Next > button. A new page will appear. - Select the
Clone URI
from the list that appears in the new page of the dialog. Click the Next > button. A new page will appear. - Enter the URI for the lv-libssh2-c git repository in the URI: field, i.e.
https://github.com/fieldrndservices/lv-libssh2-c.git
. The Host: and Repository path: fields will populate automatically. Click the Next > button. A new page will appear. - Ensure only the
master
checkbox is checked in the Branch Selection page of the Import Projects from Git dialog. Click the Next > button. A new page will appear. - Browse to the workspace directory for NI Eclipse to populate the Directory: field. Leave all other fields as the defaults. Click the Next > button. A new page will appear.
- Select the
Import existing projects
radio button from the options under the Wizard for project import section. Click the Next > button. A new page will appear. - Click the Finish button. No changes are needed on the Import Projects page. A new
lv-libssh2-c
project should appear in the Project Explorer. - Right-click in the Project Explorer on the left and select Import from the context menu that appears. A new dialog will appear.
- Select
Git->Projects from Git
from the dialog that appears. Click the Next > button. A new page will appear. - Select the
Clone URI
from the list that appears in the new page of the dialog. Click the Next > button. A new page will appear. - Enter the URI for the libssh2 git repository in the URI: field, i.e.
https://github.com/libssh2/libssh2.git
. The Host: and Repository path: fields will populate automatically. Click the Next > button. A new page will appear. - Ensure only the
master
checkbox is checked in the Branch Selection page of the Import Projects from Git dialog. Click the Next > button. A new page will appear. - Browse to the workspace directory for NI Eclipse to populate the Directory: field. Leave all other fields as the default. Click the Next > button. A new page will appear.
- Select the
Use the New Project wizard
radio button from the options under the Wizard for project import section. Click the Finish button. A new dialog will appear. - Select
C Project
from the Wizards section in the dialog. Click the Next > button. A new page will appear. - Enter
libssh2
for the Project name:. Optionally, uncheck the Use default location checkbox and a path for the Location field. The default location should be NI Eclipse's workspace. Click the Next > button. A new page will appear. - Click the Next > button. Do not change any of the defaults. A new page will appear.
- Click the Finish button. All dialogs will disappear and the
libssh2
project should appear in the Project Explorer along with thelv-libssh2-c
project. - Click on the
libssh2
project in the Project Explorer. - Right-click on the
libssh2
project and selectTeam->Switch To->Other
. A new dialog will appear. - Expand the
Tags
item in the tree that appears in the dialog. - Highlight the
libssh2-1.8.2
item and click the Checkout button. An information dialog will appear. Click the OK button. This ensures the correct version of the libssh2 dependency is used to build the lv-libssh2-c project. - Click on the
lv-libssh2-c
project in the _Project Explorer. - Click the Build toolbar button (icon is a small hammer) to build the NI Linux RT x86_64-based shared object (so).
- Click the drop-down menu next to the Build toolbar button and select the
ARM
build configuration. This will build the NI Linux RT ARM-based shared object (so).
Note, steps 3-25 only need to be done once to setup the project. A libssh2lv.so
will be located in the x86_64
folder under the project's root folder inside the Eclipse workspace folder, and a similar libssh2lv.so
for the ARM architecture will be located in the ARM
folder under the project's root folder inside the Eclipse workspace folder.