That worked great. Thanks. Dave -----Original Message----- From: U.Nakamura [mailto:usa / garbagecollect.jp] Sent: Thursday, January 20, 2005 5:03 AM To: ruby-core / ruby-lang.org Subject: Re: Building ruby 1.8.2 with static extensions on Windows XP Hello, In message "Building ruby 1.8.2 with static extensions on Windows XP" on Jan.20,2005 13:57:41, <dave / infoether.com> wrote: | My ultimate goal is to embed ruby into my own executable and to statically | link in the extensions there; but I wanted to see how ruby did it first. | Any ideas on what this problem may be? Does this patch help you? Index: ext/extmk.rb =================================================================== RCS file: /home/cvs/ruby/ext/extmk.rb,v retrieving revision 1.44.2.6 diff -u -1 -p -r1.44.2.6 extmk.rb --- ext/extmk.rb 1 Nov 2004 08:21:05 -0000 1.44.2.6 +++ ext/extmk.rb 20 Jan 2005 10:01:24 -0000 @@ -116,4 +116,5 @@ def extmake(target) $extpath ||= [] - $extflags += " " + $DLDFLAGS unless $DLDFLAGS.empty? - $extflags += " " + $LDFLAGS unless $LDFLAGS.empty? + unless $mswin + $extflags = ($extflags.split | $DLDFLAGS.split | $LDFLAGS.split).join(" ") + end $extlibs = merge_libs($extlibs, $libs.split, $LOCAL_LIBS.split) Index: win32/Makefile.sub =================================================================== RCS file: /home/cvs/ruby/win32/Makefile.sub,v retrieving revision 1.59.2.11 diff -u -1 -p -r1.59.2.11 Makefile.sub --- win32/Makefile.sub 28 Dec 2004 03:28:10 -0000 1.59.2.11 +++ win32/Makefile.sub 20 Jan 2005 10:01:25 -0000 @@ -147,2 +147,3 @@ LIBRUBYARG = $(LIBRUBY) EXTOBJS = +DLDOBJS = @@ -422,5 +423,5 @@ $(LIBRUBY): $(RUBYDEF) -$(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS) $(RUBYDEF) $*.res - @echo. $(EXTOBJS) - $(LIBRUBY_LDSHARED) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY_A) $*.res $(LIBS) \ +$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $*.res + @echo. $(DLDOBJS) + $(LIBRUBY_LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) $*.res $(LIBS) \ -Fe$@ $(LDFLAGS) $(LIBRUBY_DLDFLAGS) Regards, -- U.Nakamura <usa / garbagecollect.jp>