views:

27

answers:

1

Has anyone successfully built the dnssd gem on Windows?

I get the following error when trying to build the c extension:

C:\Users\Charles>gem install dnssd -- --with-dnssd-dir=c:/progra~1/bonjou~1 --with-dnssd-lib=c:/progra~1/bonjou~1/lib/win32
Building native extensions.  This could take a while...
ERROR:  Error installing dnssd:
        ERROR: Failed to build gem native extension.

C:/Ruby19/bin/ruby.exe extconf.rb --with-dnssd-dir=c:/progra~1/bonjou~1 --with-dnssd-lib=c:/progra~1/bonjou~1/lib/win32
checking for dns_sd.h... yes
checking for main() in -ldnssd... yes
checking for htons in arpa/inet.h... no
checking for htons() in arpa/inet.h... no
couldn't find htons
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.  Check the mkmf.log file for more details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby19/bin/ruby
        --with-warnings
        --without-warnings
        --with-dnssd-dir
        --with-dnssd-include
        --without-dnssd-include=${dnssd-dir}/include
        --with-dnssd-lib=${dnssd-dir}/lib
        --with-dnssdlib
        --without-dnssdlib


Gem files will remain installed in C:/Ruby19/lib/ruby/gems/1.9.1/gems/dnssd-1.3.1 for inspection.
Results logged to C:/Ruby19/lib/ruby/gems/1.9.1/gems/dnssd-1.3.1/ext/dnssd/gem_make.out

How can I fulfill the "Checking for htons" part?

Thanks!

A: 

Execute Below command and its works

C:\Users\Charles>gem install dnssd --platform=mswin32

Amit