Getting Started Guide | LGSx SDK 2025.0.0


Leica Geosystems
Leica LGSx SDK Getting Started Guide
Overview
This guide is intended for Windows and Linux developers. Each LGSx SDK release includes one or more sample programs that demonstrate the available API functions.
Windows Integration
The following steps outline the process for utilizing the LGSx SDK:
Extract the provided .zip file containing the LGSx SDK. The extracted file structure should appear as follows:
\acknowledgements \bin \doc \include \lib \samples VC_redist.x64.exe
After extraction, install VC_redist.x64.
The full SDK documentation is located in the \doc folder.
A sample program executable, LgsxReaderExample.exe, is located in the \bin folder. This sample can be used to output the contents of an LGSx file. A sample LGSx file, testMobile.lgsx, is included in the \samples folder. To test the LgsxReaderExample.exe, use the following command:
LgsxReaderExample -i ../samples/testMobile.lgsx
The following steps describe how to build and run the provided sample programs from source code. Visual Studio 2022 and CMake 3.16 (or newer) are required.
From the command line, starting in the extracted LGSx SDK root folder:
cd samples cmake -S . -B ./msvc2022_64
This command generates a Visual Studio solution file in a new targets folder located at samples\msvc2022_64.
cd msvc2022_64 LgsxSdk-Examples.sln
This command navigates to the new targets folder and launches Visual Studio with the newly created solution. The sample program can be built and run from within Visual Studio.
Linux Integration
Extract the provided LGSx SDK package:
sudo tar -xvzf <LGSx SDK Package>.tar.gz
The extracted directory structure should appear as follows:
/acknowledgements /bin /doc /include /lib /samples
The full SDK documentation is located in the doc folder.
The LGSx package includes a sample application, LgsxReaderExample, which outputs the contents of an LGSx file. Both the source and executable for provided examples can be found in the SDK. The following steps outline how to run the executable, starting in the LGSx SDK root directory:
cd bin ./LgsxReaderExample -i ../samples/testMobile.lgsx
To build provided examples from source code, gcc 11 and CMake 3.16` (or newer) are required.
A. Setting up the environment
The required development tools can be installed using the following commands:
sudo apt-get update sudo apt-get install --no-install-recommends -y \ build-essential \ gcc-multilib g++-multilib \ cmake ninja-build
Install the necessary library dependencies using:
sudo apt-get install --no-install-recommends -y \ libgomp1 libcurl4 libgl1 libglu1
B. Building and running examples
Use the following steps to build and run provided examples (starting in the LGSx SDK root directory):
cd samples cmake -S . -B ./build cd build cmake --build .
This process creates a targets directory samples/build and builds provided examples executables there.
To test LgsxReaderExample, use the same command as previously:
./LgsxReaderExample -i ../testMobile.lgsx
WSL Integration
The following steps outline the process for utilizing the LGSx SDK under Windows Subsystem for Linux (WSL):
Enable "Virtualization in BIOS."
Enable Hyper-V in Windows.
Install WSL. Use the following link to install the supported Ubuntu release: Ubuntu 22.04.5 LTS - Free download and install on Windows | Microsoft Store
SDK Know-How
Most SDK functionality is located in the include/LgsxSdk/LgsxReader.h header file. This file should be included in the application.
The LgsxReaderExample main function provides a standard workflow (
Lgsx_Initialize
,Lgsx_InitLicense
, ...,Lgsx_Uninitialize
). Additional details can be found in the SDK documentation.
Questions or Comments? Contact LGSx SDK Support
Copyright (c) 2025, Leica Geosystems, Inc.