Yiding
Yiding

Reputation: 2954

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

Upvotes: 58

Views: 75041

Answers (3)

SBF
SBF

Reputation: 1369

On CentOS 7:

sudo yum install bluez-libs-devel

Upvotes: 1

Abishek Balu
Abishek Balu

Reputation: 101

For Fedora, you can use:

sudo dnf install bluez-libs-devel

Upvotes: 10

Rahul R Dhobi
Rahul R Dhobi

Reputation: 5816

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

sudo apt-get install libbluetooth-dev

That should install the bluetooth header files.

Upvotes: 118

Related Questions