[PD-dev] [leapmotion] 2.3.1 linking failure on Windows

Christof Ressi info at christofressi.com
Tue Jan 3 21:44:30 CET 2023


> That said, would it be worth my time to try and set up a Visual Studio 
> project and build against the old C++ library there?

If you use CMake, you only have to specify the appropriate Visual Studio 
generator. That's it. You build your project with

cmake --build .

and it will automatically use the MSVC++ compiler. No need to open 
Visual Studio at all. (Of course, you have to install it.)

---

Another thing you could do is write your own C wrapper library around 
the original Leap C++ library, build it with MSVC++ and then use that 
for your Pd external.

Christof

On 04.01.2023 02:31, William Brent wrote:
> Thanks IOhannes, this is helpful and it explains why I was able to 
> link to the newest Leap library on Windows for the 
> ultraleap external - that one is in straight C.
>
> That said, would it be worth my time to try and set up a Visual Studio 
> project and build against the old C++ library there? I only have 
> experience using VS with JUCE-generated projects so it would be a bit 
> of a slog for me to try and set things up from a blank slate, but I'd 
> be game if there's hope it'll work. I'm just trying to get this 
> accessible to as many students as possible, and the old library offers 
> tool and gesture tracking, which Leap has dropped in the new version.
>
>
> On Tue, Jan 3, 2023 at 3:13 PM IOhannes m zmölnig <zmoelnig at iem.at> wrote:
>
>     Am 3. Jänner 2023 23:10:59 MEZ schrieb William Brent
>     <william.brent at 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 at lists.iem.at
>     https://lists.puredata.info/listinfo/pd-dev
>
>
>
> -- 
> William Brent
>
> “Great minds flock together”
> Conflations: conversational idiom for the 21st century
>
> www.conflations.com <http://www.conflations.com>
>
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at lists.iem.at
> https://lists.puredata.info/listinfo/pd-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20230103/cd453809/attachment-0001.htm>


More information about the Pd-dev mailing list