Where is the bluetooth/bluetooth.h located in Linux?

CLinuxBluetoothIbeaconBluez

C Problem Overview


I want to build a c file based on BlueZ but seems no bluetooth.h file in my system.

fatal error: bluetooth/bluetooth.h: No such file or directory

I am sure the bluetooth dongle is running correctly and I have built Bluez successfully.

Update

For my case, I find the bluetooth.h in /user/include/bluetooth folder

C Solutions


Solution 1 - C

You need to install libbluetooth-dev package for compiling your code

sudo apt-get install libbluetooth-dev

That should install the bluetooth header files.

Solution 2 - C

For Fedora, you can use:

sudo dnf install bluez-libs-devel

Solution 3 - C

On CentOS 7:

sudo yum install bluez-libs-devel

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionYidingView Question on Stackoverflow
Solution 1 - CRahul R DhobiView Answer on Stackoverflow
Solution 2 - CAbishek BaluView Answer on Stackoverflow
Solution 3 - CSBFView Answer on Stackoverflow