I checked the SDK and it can not be used with Freepascal at this time.
The classes need to be flattened into a pure C proxie API which has not been done yet.
There are two issues here:
- FPC does not support C++ classes on interfacing level (yet, it is on the wish list), but it does support any pure C API.
- The manufacturer should really provide a flattened C interface, not Freepascal (or any other language that does not support C++ class interfaces)
As it stands, this API is strictly tied to C++.
So you can do two things:
- Flatten the API into pure C yourself, which requires quite some work on your side (and knowledge of C++, C and - e.g. - Freepascal)
- Ask the manufacturer to open things up for other programming languages by providing a pure C interface on top of the C++ classes..
There are some tricks/hacks to make this work in FPC otherwise but these are:
- C++ compiler dependend
- Platform dependend
- Not guaranteed to work and tied to compiler and platform versions.
- depend on internal knowledge of how a particular C++ compiler lays out its classes and VMT's.
So as it stands you need an API as a C interface, flattened, from the C++ interface.
( The hack is usually like this: C++ VMT's always starts at relative zero. If you know the alignment and calling convention you can declare a pure abstract Pascal class/object/record and take a pointer to the C++ class and cast it to the pure abstract class. Since all methods are external, you can subsequently call the C++ class methods through the cast. Although this works sometimes, it is not recommended)