Native C/C++ API on Linux?

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

Native C/C++ API on Linux?

Postby jnovel » Sat May 01, 2021 8:39 am

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?

Postby jnovel » Mon May 03, 2021 7:57 am

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?

Postby jnovel » Mon Jun 21, 2021 8:40 am

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: 3227
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

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

Postby Patrick » Tue Jun 22, 2021 11:54 am

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: 3227
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

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

Postby Patrick » Tue Jun 22, 2021 12:00 pm

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


Return to “Android”

Who is online

Users browsing this forum: No registered users and 2 guests