Page 1 of 1

Native C/C++ API on Linux?

Posted: Sat May 01, 2021 8:39 am
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!

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

Posted: Mon May 03, 2021 7:57 am
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.

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

Posted: Mon Jun 21, 2021 8:40 am
by jnovel
Well it looks like the Phidgets API is a native one.

I'd love to bypass JNI and call them directly.

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

Posted: Tue Jun 22, 2021 11:54 am
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

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

Posted: Tue Jun 22, 2021 12:00 pm
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