-#RUBY=c:/ruby
+RUBY=c:/ruby192
ifdef RUBY
ifndef DYNAMIC_RUBY
DYNAMIC_RUBY=yes
endif
# Set default value
ifndef RUBY_VER
-RUBY_VER = 16
+RUBY_VER = 191
endif
ifndef RUBY_VER_LONG
-RUBY_VER_LONG = 1.6
+RUBY_VER_LONG = 1.9.1
endif
However, ":echo has('ruby')" returns 0 and ":ruby puts 'Hello'" returns
E448: Could not load library function rb_str2cstr
E266: Sorry, this commands is disabled, the Ruby library could not be loaded.
Running ":version" shows "+ruby/dyn" and -DDYNAMIC_RUBY_DLL="msvcrt-ruby191.dll" and PATH has C:\ruby192\bin containing msvcrt-ruby191.dll
Any ideas on what's going wrong?
Jon
Something very similar happens when compiling 7.3.003 against 1.9.2
using MSVC10/MSSDK-7.1 - the static build obviously fails with a
slightly different
if_ruby.obj: error LNK2001: unresolved external symbol __imp__ruby_errinfo
Cheers,
Leo
Ruby 1.9.1 or Ruby 1.9.2? Or did you compile with the *.h include files
of 1.9.2 (from C:\ruby192\include or wherever) and try to run with the
1.9.1 DLL?
Best regards,
Tony.
--
Arithmetic is being able to count up to twenty without taking off your
shoes.
-- Mickey Mouse
1.9.2 is library-compatible with 1.9.1, so internal version of 192 is
191, it names libraries with 191, and stuff is installed under 1.9.1
Cheers,
Leo
Compiled with 1.9.2's *.h and the only Ruby DLL on PATH is the 1.9.2 DLL named msvcrt-ruby191.dll
As Leo replied, 1.9.2 is "library compatible" with 1.9.1 so the key is to point RUBY to the 1.9.2 root dir but then view RUBY_VER and RUBY_VER_LONG as a library compatibility version since the source directories on 1.9.2 use 1.9.1.
Interesting, I know, it tripped me up on early compile attempts with strange errors, but here's ruby-core's FAQ entry in their 1.9.2 announcement http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9-2-is-released/
I haven't had a chance to look at if_ruby.c starting here http://code.google.com/p/vim/source/browse/src/if_ruby.c#412
Something very similar happens when compiling 7.3.003 against 1.9.2 using MSVC10/MSSDK-7.1 - the static build obviously fails with a slightly different if_ruby.obj: error LNK2001: unresolved external symbol __imp__ruby_errinfo
Please review, test, and let me know what further mods are needed.
Make sure you're not crossing the headers - if you're compiling with
mingw you must point it @ i386-mingw32 ruby headers, otherwise is at
i386-mswin32.
So long as its a dynamic build of vim, all that matters is that you
have the right includes /for the compiler you're building vim with/,
so you can use mswin32 includes to link to mingw ruby and vice-versa.
Just steal the includes you don't have (the whole arch folder) and
just put in with the other.
Cheers,
Leo
Make sure you're not crossing the headers - if you're compiling with mingw you must point it @ i386-mingw32 ruby headers, otherwise is at i386-mswin32.
Bram (see :help credits) is the Vim developer. It's an awkward
time currently because Bram was super busy preparing the Vim 7.3
release over the last few weeks, so if there is no response now,
I think it would be best to raise the matter again, starting
from scratch, in say two weeks.
John
This patch has made it possible to load Ruby dynamically on Unix.
However, there is no patch for configure, thus one can't actually do
this. Can somone make a patch for configure to load Ruby dynamically?
--
I have to exercise early in the morning before my brain
figures out what I'm doing.
/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Attached.
--
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jame...@jamessan.com>
> > This patch has made it possible to load Ruby dynamically on Unix.
> > However, there is no patch for configure, thus one can't actually do
> > this. Â Can somone make a patch for configure to load Ruby dynamically?
>
> Attached.
That was quick! Thanks.
--
FIRST GUARD: Ah! Now ... we're not allowed to ...
SIR LAUNCELOT runs him through, grabs his spear and stabs the other
guard who collapses in a heap. Hiccoughs quietly.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD