2010-02-25 166 views
0

有没有人在Windows上成功构建dnssd gem?在Windows上安装dnssd gem

我在尝试构建C扩展名,当出现以下错误:

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 

我怎样才能履行“检查htons”的一部分?

谢谢!

+0

找到任何解决办法,以正确安装呢?因为--platform选项不能解决我的安装问题。 – cz3ch 2011-11-30 16:59:09

回答

0

执行以下命令及其作品

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