Skip to main content
Skip table of contents

LGSx SDK Getting Started Guide

Leica Geosystems

Leica LGSx SDK 2024.0 Getting Started Guide

Product

Leica LGSx SDK 2024.0 Getting Started Guide

Date

February 2, 2024

Created by

Reality Capture Software Product Management

Overview

This guide is intended for Windows and Linux developers. Within each LGSx SDK release you will find one or more sample programs that are provided for a quick demonstration of the available API functions.

Simplicity is key for realizing successful integrations with Leica SDKs.

Let’s get started….

Windows Integration

Following are the required steps for utilizing the LGSx SDK:

  1. Run the provided InstallShield as Administrator on the target host machine. By default, this will install the SDK to C:\ProgramData\Leica Geosystems\LGSx SDK 202X.Y\ We refer to this as the LGSx SDK Root Folder below. The installer will create the following folders below the LGSx SDK Root Folder:

\Acknowledgements
\bin
\doc
\Include
\Lib
\Samples
\thirdparty

  1. Review the Release Notes and Getting Started Guide located in \doc

  2. A sample program executable (LgsxReaderExample.exe) is located in \bin\x64
    You can run the sample to output the contents of an LGSx file. We have included a sample LGSx file (testMobile.lgsx) in \Samples.

  3. Review the SDK Reference documentation, named: LGSx_sdk.chm, in \doc

  4. Use the following steps to build and run the LgsxReaderExample sample program from source code. You will need Visual Studio 2022 and CMake 3.2 (or newer).

From the Visual Studio developer’s command line, starting in the LGSx SDK Root Folder :

cd Samples

cmake -S . -B ./msvc2022_64

This will generate a Visual Studio solution file (.sln) in a new targets folder at Samples/msvc2022_64.

cd msvc2022_64

LgsxSdk-Examples.sln

This will move to the new targets folder and launch Visual Studio with the new solution. You can build and run the sample program from within Visual Studio.

Linux Integration (WSL)

Following are the required steps for utilizing the LGSx SDK under Windows Subsystem for Linux (WSL):

  1. Enable “Virtualization in BIOS”

“Virtualization” must be enabled in the firmware bios in order for the installation of WSL to complete successfully. You can verify the status by entering systeminfo from a command-prompt in Windows®. There will be a section at the bottom labeled “Hyper-V Requirements”. In this section, it will show the following if virtualization is disabled:
Virtualization Enabled In Firmware: No

  When enabled, it will read:
A hypervisor has been detected. Features required for Hyper-V will not be displayed.”

Note: Enabling virtualization in bios can be a bit tricky as it will be in a different location depending on the host machine. Below are common steps for turning on virtualization:

I) Restart machine and go into BIOS configuration by repeatedly hitting the <ESC> key during startup.

II) From the BIOS menu, select “Security/System Security”

III) Check the box labeled, “Virtualization Technology (VTx)”

IV) Save/Exit

V) Reboot

  1. Enabling Hyper-V in Windows

    1. Right click on the Windows button and select 'Apps and Features'.

    2. Select Programs and Features on the right under related settings.

    3. Select Turn Windows Features on or off.

    4. Select Hyper-V and click OK.

Note: Failing to enable Virtualization in BIOS and Windows prior to installation will result in the following error: WslRegisterDistribution failed with error: 0x80370102

Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS. For more information, please visit https://aka.ms/enablevirtualization


3. Installing WSL

Use the following link to install the supported Ubuntu release:

https://apps.microsoft.com/detail/ubuntu-20-04-6-lts/9MTTCL66CPXJ?hl=en-us&gl=US

To verify that the correct WSL, open a command shell and enter:

> wsl -l -v

Result should be as follows:

  NAME      STATE            VERSION
* Ubuntu-20.04    Running         2

  1. Finally, you are ready to extract the LGSx SDK package. We recommend that you move the package to a newly created LGSx SDK Root directory before extracting it:
    sudo tar -xvzf <LGSx SDK Package>.tar.gz

This will extract the following directories:

/acknowledgements
/bin
/doc
/include
/lib
/samples

  1. The LGSx package includes a sample application LgsxReaderExample to output the contents of an LGSx file. We have provided both the source and executable for LgsxReaderEample. Below are the steps to run the executable from the WSL Terminal app (starting in the LGSx SDK Root directory):

cd /bin/gcc9.4_x64

export LD_LIBRARY_PATH=../../lib/gcc9.4_x64/

./LgsxReaderExample ../../samples/TestPlant.lgsx

You can also run the included shell script to do this:

sh RunReader.sh

  1. You can also build LgsxReaderExample from source code. To do this, you will need gcc 9.4 and CMake 3.2 (or newer).

    1. Install Development Tools

If you haven’t installed the development tools, do that now. (skip to the next step if you already have gcc and cmake).

The following command will install common development components, including gcc and cmake:

sudo apt update
sudo apt install build-essential

To verify which versions are installed:

gcc --version

cmake --version

b. Use the following steps to build and run LgsxReaderExample (starting in the LGSx SDK Root directory):

cd samples

cmake -S . -B ./gcc9.4_x64

cd gcc9.4_x64

cmake --build .

This will create a targets directory samples/gcc9.4_x64 and build the LgsxReaderExample executable there. If you haven’t already exported LD_LIBARRY_PATH do this now (this only needs to be done once per terminal session).

export LD_LIBRARY_PATH=./:../../lib/gcc9.4_x64

Enter the following to run LgsxReaderExample :

./LgsxReaderExample ../TestPlant.lgsx



Questions or Comments? Contact LGSx SDK Support




Copyright (c) 2023 - 2024, Leica Geosystems, Inc.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.