To be more specific, the linker error itself is most likely caused by name mangling differences. When you include the header file in your project, the class/function definitions use your compiler's name mangling, but the accompanying DLL has been built with another compiler, using a different name mangling scheme.

Seems like there is also a C API: https://docs.ultraleap.com/tracking-api/leapc-guide.html

Things are of course different on windows: you generally cannot mix&match MSVC libraries with GCC binaries (and vice versa), at least if c++ is involved.
For the sake of completeness: yes, that's true for the typical case, but there are techniques for creating binary compatible C++ interfaces. The most prominent one is COM. Other examples that come to my mind are the VST3 SDK or openvr SDK.

On 03.01.2023 21:12, IOhannes m zmölnig wrote:
Am 3. Jänner 2023 23:10:59 MEZ schrieb William Brent <william.brent@gmail.com>:
x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
src/leapmotion.o:leapmotion.cpp:(.text+0x411): undefined reference to
`Leap::Frame::timestamp() const'
C++ is a fantastic language.
Unfortunately it is not really standardised on the binary level, which basically means that you might not be able to use c++ libraries compiled with one compiler/linker with binaries created by another compiler/linker.

Now, clang kind of guarantees binary compatibility with g++ binaries, which pretty much covers the Linux & macOS worlds.
Things are of course different on windows: you generally cannot mix&match MSVC libraries with GCC binaries (and vice versa), at least if c++ is involved.

Proprietary SDKs often provide MSVC libraries.

So if possible, try to use a C-library instead of a C++-library on windows.


mfg.sfg.jfd
IOhannes


_______________________________________________
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev