weliem / bluez_inc

A C library for Bluez (BLE) that hides all DBus communication. It doesn't get easier than this. This library can also be used in C++.
MIT License
89 stars 22 forks source link

extern C for header files #5

Closed bp1001 closed 1 year ago

bp1001 commented 1 year ago

Hi,

Thank you alot for your work. Would it be possible to add the

ifdef __cplusplus

extern "C" {

endif

ifdef __cplusplus

}

endif

around the public header files to make it useable with c++?

Preferably only put them around the function prototypes, not the includes. New versions of Glib apparently include C++ headers, so that putting the extern "C" around the glib includes generates compile errors.

Regards

weliem commented 1 year ago

Feel free to raise a PR! Then you can immediately check if it works as expected...

bp1001 commented 1 year ago

I have added the changes locally now, everything seems to be working fine. I tried to push the changes to a new branch, but I do not seem to have the access rights to do so.

weliem commented 1 year ago

The way it works on Github is that you first 'fork' a repo. Then you make changes and raise a PR back to the original repo....

weliem commented 1 year ago

Thanks for the PR, closing this issue