27

I'm trying to build a demo project using Bonjour, following this tutorial, but i'm getting this error:

error: dns_sd.h: No such file or directory

It happens on this line:

#include <dns_sd.h>

Where do I get that header file?

sashoalm
  • 69,127
  • 105
  • 396
  • 720

3 Answers3

69

I just had this error on Ubuntu while trying to compile a project. This helped:

sudo apt-get install libavahi-compat-libdnssd-dev
friederbluemle
  • 28,615
  • 14
  • 96
  • 99
2

You can find the mDNSResponder daemon code here: http://www.opensource.apple.com/source/mDNSResponder/

You can download a tar file here: http://www.opensource.apple.com/tarballs/mDNSResponder/

sashoalm
  • 69,127
  • 105
  • 396
  • 720
user2599140
  • 468
  • 2
  • 9
1

You can use Avahi configured with mdnsresponder-compat

Sergei Krivonos
  • 3,589
  • 3
  • 36
  • 48