wxruby-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wxruby-dev] Windows build error


From: Park Heesob
Subject: Re: [Wxruby-dev] Windows build error
Date: Sat, 19 Jul 2003 10:17:51 +0900

Hi,
----- Original Message ----- 
From: "Kevin Smith" <address@hidden>
To: <address@hidden>
Sent: Friday, July 18, 2003 11:48 PM
Subject: Re: [Wxruby-dev] Windows build error


> On Fri, 2003-07-18 at 05:51, Park Heesob wrote:
> > There is some problems in the lastest CVS version extconf.rb.
> >
> > 1) depends file problem
> >
> > I see this error
> > NMAKE : fatal error U1073: don't know how to make 'button.obj'
> > Stop.
> >
> > The content of depends is like this:
> > app.o: app.cpp wx.h  app_cb.h app.h
> >
> > But for Windows environment it must be like this:
> > app.obj: app.cpp wx.h  app_cb.h app.h
>
> This is true. depends needs to refer to .obj files under MSW, instead of
> .o files. After I sent that last message, I thought "wait a minute,
> didn't Roy say .obj instead of .o?"
>
> > I recommand remove  'f.puts("include depends")' from extconf.rb
> > And rename "depends" to "depend".
> > Then extconf.rb automatically modify content of depend file and add to
> > Makefile.
>
> But that won't work, because depends needs to include dependencies that
> can't be known at the time extconf.rb runs, such as button.cpp depending
> on window.h. This is because of the extra process for .t files.
>
> So I think I can just modify my depends file to include a second copy of
> itself, replacing all the .o with .obj. The MSW version will ignore all
> the .o entries, and the Linux version will ignore all the .obj entries.
>
> Roy: You can try this yourself, for now, by editing 'depends', and just
> replacing all '.o' with '.obj'. But you'll have to start with a fresh
> cvs checkout (aside from this change) in order to really test that it
> can build all the .t files correctly.
>
> Kevin
>

I can see at mkmf.rb in Ruby 1.8.0 source

  depend = File.join(srcdir, "depend")
  if File.exist?(depend)
    open(depend, "r") do |dfile|
      mfile.printf "###\n"
      while line = dfile.gets()
 line.gsub!(/\.o\b/, ".#{$OBJEXT}")
 line.gsub!(/(\s)([^\s\/]+\.[ch])/, '\1{$(srcdir)}\2') if $nmake
 line.gsub!(/\$\(hdrdir\)\/config.h/, $config_h) if $config_h
 mfile.print line
      end
    end
  end

I tried extconf.rb after renaming depends to depend.
All works fine.

Regards,

Park Heesob






reply via email to

[Prev in Thread] Current Thread [Next in Thread]