This project provides tools to generate a C# wrapper for the Baumer neoAPI SDK on Linux using SWIG.
- SWIG: Simplified Wrapper and Interface Generator (
sudo apt install swig) - g++: GNU C++ compiler
- Baumer neoAPI SDK: The SDK directory (e.g.,
Baumer_neoAPI_1.5.0_lin_x86_64_cpp) should be present or its path provided to the build script.
Run the generate_interface.sh script to create the neoapi.i file. This script automatically adds ergonomic C# properties (like SerialNumber, ModelName, etc.) to the CamInfo class to match the Windows neoAPI implementation.
./generate_interface.sh [path_to_sdk]Run the build_wrapper.sh script to generate the C# source and the native shared library.
./build_wrapper.sh [path_to_sdk]This will produce:
wrapper/neoAPI_linux.cs: Consolidated C# wrapper classes.wrapper/libneoapi_csharp.so: Native library required for runtime.
generate_interface.sh: Script to generate the SWIG interface file (neoapi.i).build_wrapper.sh: Script to run SWIG and compile the native wrapper library.neoapi.i: The SWIG interface definition.wrapper/: Directory containing the generated output and native library dependencies..gitignore: Configured to ignore intermediate build artifacts and native libraries.
- SDK Path: If the SDK is not in the default directory, ensure you provide the absolute path as an argument to the scripts.
- RPath: The generated native library uses
$ORIGINand$ORIGIN/libin its RPath to find the neoAPI C++ libraries. Ensure the required.sofiles are available in thewrapper/libdirectory.