Project1

标题: [rUBY]继续求助 == [打印本页]

作者: yangff    时间: 2011-4-26 22:51
标题: [rUBY]继续求助 ==
貌似说要什么tool= =求解释
D:\G3D\g3d-ruby\source>extconf
Host: i686-pc-mingw32
checking for main() in -lz... *** D:/G3D/g3d-ruby/source/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=D:/G3D/g3d-ruby/source
        --curdir
        --ruby=C:/Ruby192/bin/ruby
        --with-SDL-dir
        --without-SDL-dir
        --with-SDL-include
        --without-SDL-include=${SDL-dir}/include
        --with-SDL-lib
        --without-SDL-lib=${SDL-dir}/lib
        --with-G3D-dir
        --without-G3D-dir
        --with-G3D-include
        --without-G3D-include=${G3D-dir}/include
        --with-G3D-lib
        --without-G3D-lib=${G3D-dir}/lib
        --with-zlib
        --without-zlib
C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to genera
te an executable file. (RuntimeError)
You have to install development tools first.
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:440:in `try_link'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:552:in `try_func'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:748:in `block in have_library'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postp
one'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
        from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:743:in `have_library'
        from D:/G3D/g3d-ruby/source/extconf.rb:13:in `<main>'

作者: 苏小脉    时间: 2011-4-27 02:27
这货同时需要 G3D 和 SDL 的源啊。
  1. ********************************************************************
  2. * Building G3DRuby on Windows using Visual Studio 6.0:
  3. *********************************************************************
  4. 1) To link to G3D using MSVC++ 6.0, you must have MSVC Service Pack 5
  5.    (service pack 6 does not support SSE). To use SSE instructions, you
  6.    also need the Processor Pack. For more information (and links), see:
  7.    http://g3d-cpp.sourceforge.net/#downloads
  8. 2) If you don't have Ruby, download and install the Ruby installer from:
  9.    http://rubyinstaller.rubyforge.org/wiki/wiki.pl
  10. 3) Make sure Ruby and the Visual Studio bin directories are in your path
  11.    (find and run vcvars32.bat if nmake isn't in your path)
  12. 4) Choose a root folder for all projects to live in
  13. 5) Download http://prdownloads.sourceforge.net/g3d-cpp/g3d-6_10.zip?download
  14.    and http://www.libsdl.org/release/SDL-devel-1.2.10-VC6.zip
  15. 6) Unzip the G3D package into <root>\g3d-6_10
  16. 7) Unzip the SDL package into <root>\SDL-1.2.10
  17. 8) Unzip the G3DRuby source into <root>\g3d-ruby
  18. 9) Run build.bat from <root>\g3d-ruby\source
复制代码

作者: link006007    时间: 2011-4-27 12:04
"probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  "
想搞3DRPGMaker吗。。
我想到了以前用一个叫做swig还是什么的东西转换C代码到可以嵌入到ruby的结构。。  他把每个函数参数都来做类型检查,真是好严谨
作者: zgzhmh    时间: 2011-4-27 14:04
提示: 作者被禁止或删除 内容自动屏蔽
作者: 苏小脉    时间: 2011-4-27 14:09
link006007 发表于 2011-4-27 12:04
"probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  "

SWIG 真的很方便,比较适用于现存的 C/C++ 库 =)
不过如果是自己写的 Ruby 扩展的话还是用 mkmf 的比较多。
C/C++ 库的函数都是静态类型的,自然要做类型检测,Win32API 不也要做嘛。
作者: yangff    时间: 2011-4-28 22:45
thx各位,显然是RM3D……居然是OGL的蛋那个疼= =




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1