Native C/C++ API on Linux?

Supporting 4.1 and up
Post Reply
jnovel
Fresh meat
Posts: 3
Joined: Sat May 01, 2021 8:37 am
Contact:

Native C/C++ API on Linux?

Post by jnovel »

I am using Qt (C++) on Linux and I wish to bypass Java entirely, using the .so files directly. Qt provides the activity for me, so I just need to call the native API from C++. (It's actually more work for me to use the Java API)

Where can I find the information on what API is exposed and has anyone done this previously?

Thank you!
jnovel
Fresh meat
Posts: 3
Joined: Sat May 01, 2021 8:37 am
Contact:

Re: Native C/C++ API on Linux?

Post by jnovel »

Just FYI, the duplicate post (now deleted), did not show up right away, so I thought I did not do it, and that's why I posted it 2x.
jnovel
Fresh meat
Posts: 3
Joined: Sat May 01, 2021 8:37 am
Contact:

Re: Native C/C++ API on Linux?

Post by jnovel »

Well it looks like the Phidgets API is a native one.

I'd love to bypass JNI and call them directly.
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Native C/C++ API on Linux?

Post by Patrick »

If you installed using packages, just install the libphidget22dev package to get the phidget22.h header and dev files. If you installed with 'make install' those are already installed. Have a look at the C API and examples.

-Patrick
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Native C/C++ API on Linux?

Post by Patrick »

Oh I missed that you're on Android.

You could develop against the supplied native .so, you'll need to generate the phidget22.h header from our Linux source release. The Android USB code is implemented in Java (phidget22usb.jar) - so if you care about native USB, you'll need to at a minimum initialize USB from Java (or JNI).

-Patrick
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest