代码之家  ›  专栏  ›  技术社区  ›  Charles

在Windows上安装dnssd gem

  •  0
  • Charles  · 技术社区  · 16 年前

    有人在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”部分?

    谢谢!

    1 回复  |  直到 16 年前
        1
  •  0
  •   karthikr    13 年前

    执行下面的命令及其工作

    C:\Users\Charles>gem install dnssd --platform=mswin32
    
    推荐文章