Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 386
Yiding Avatar asked May 02 '14 21:05

Yiding


3 Answers

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

sudo apt-get install libbluetooth-dev 

That should install the bluetooth header files.

like image 135
Rahul R Dhobi Avatar answered Sep 21 '22 07:09

Rahul R Dhobi


For Fedora, you can use:

sudo dnf install bluez-libs-devel 
like image 32
Abishek Balu Avatar answered Sep 22 '22 07:09

Abishek Balu


On CentOS 7:

sudo yum install bluez-libs-devel
like image 21
SBF Avatar answered Sep 22 '22 07:09

SBF