我正在尝试在Windows Vista上安装bcrypt-ruby。
到目前为止,我已经能够从MS知识库文章中安装nmake.exe,并从安装Visual Studio2008Express中安装cl.exe。
然而,我现在遇到了这个错误:
cl -nologo -Wall -I. -IC:/InstantRails/ruby/lib/ruby/1.8/i386-mswin32 -I
C:/InstantRails/ruby/lib/ruby/1.8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -c -Tcb crypt.c
cl : Command line warning D9035 : option 'Og-' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-G6' bcrypt.c
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(381) : warning C4255: '_get_printf_count_output' : no function prototype given: converting '()' to '(void)'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdlib.h(215) : warning C4255: '_get_purecall_handler' : no function prototype given: converting '()' to '(void)'
c:\instantrails\ruby\lib\ruby\gems\1.8\gems\bcrypt-ruby-2.1.2\ext\mri\blf.h(37): fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2' Stop.我已经执行了VCVARS32.bat,它可能设置了环境。我怀疑这些警告和错误是由于安装较新版本的Visual Studio造成的。
有人成功地做到了这一点吗?我没有Visual Studio 6.0的副本。
发布于 2010-03-11 20:07:40
更好、最简单的方法是安装development kit
devkit-<version>.7z下载here;C:\Ruby\devkit;C:\Ruby发布于 2013-05-24 00:15:15
对我来说,下面的方法行得通
gem uni bcrypt-ruby
gem i bcrypt-ruby --platform=ruby发布于 2009-11-22 23:26:18
为了能够为一键安装程序(OCI)构建一个gem扩展,您需要VC6。混合和匹配较新的Visual Studio的不同版本将失败,或者将在运行时生成未知错误。
我建议避免所有这些麻烦,继续使用One-Click的后续版本,即RubyInstaller。
Ruby installation
INSTALL.txt上将其解压缩。说明将DevKit调整为解压缩的位置gem install bcrypt-ruby,将开箱即用有关在此新版本中使用其他gem或Rails的更多详细信息,请参阅我们的维基中的tutorials部分。
希望这能有所帮助。
https://stackoverflow.com/questions/1666511
复制相似问题