Hi everyone, As Kevin has just announced, wxruby-swig has been moved into CVS as a toplevel project. It still is not in a "releasable" form yet, but it now builds on more systems than it doesn''t, and is moving towards stability. Because of the complexity of the build environment, we''re using rake (http://rake.rubyforge.org) as a build system instead of the standard extconf.rb file. A lot of work has recently been put into getting wxruby-swig to build on Windows using the Microsoft Visual C++ compiler (MSVC) tools. It now successfully builds (or should successfully build), but it isn''t running. We''re tracking what the problem is, but we could use some help. So all you ruby programmers with MSVC/wxWidgets knowledge, we''re calling out for help! Pull the head branch from CVS, break out the debuggers and help us figure out whats going wrong! Are we incorrectly initializing wxWidgets? Is SWIG generating bad code? Did we forget a semicolon? Any help is appreciated! (This is also a good time to comment on the new build system) Nick P.S. Note to MinGW programmers - wxruby-swig isn''t building on mingw (yet). It should be working by the end of the week.
Nick wrote:> It now successfully builds (or should successfully build), but it isn''t > running. We''re tracking what the problem is, but we could use some help.For those of us without MS-Windows boxes, can you describe the symptoms of the bug(s) you''re seeing with wxruby-swig? Thanks, Kevin
Nick wrote:> > Hi everyone, > > As Kevin has just announced, wxruby-swig has been moved into CVS as a > toplevel project. It still is not in a "releasable" form yet, but it now > builds on more systems than it doesn''t, and is moving towards stability. > Because of the complexity of the build environment, we''re using rake > (http://rake.rubyforge.org) as a build system instead of the standard > extconf.rb file. > > A lot of work has recently been put into getting wxruby-swig to build on > Windows using the Microsoft Visual C++ compiler (MSVC) tools. It now > successfully builds (or should successfully build), but it isn''t > running. We''re tracking what the problem is, but we could use some help. > > So all you ruby programmers with MSVC/wxWidgets knowledge, we''re calling > out for help! Pull the head branch from CVS, break out the debuggers and > help us figure out whats going wrong! Are we incorrectly initializing > wxWidgets? Is SWIG generating bad code? Did we forget a semicolon? Any > help is appreciated! (This is also a good time to comment on the new > build system)One tip that may or may not be helpful... When I was getting the old, non-swig version to run on Windows, I also ran into problems where everything would compile, but it would not run. In my case, I was building wxWidgets using the MSVC project files (i.e., I was building it from the IDE) -- I could never get wxRuby work with this. When I switched to using nmake wxWidget''s msvc makefiles, I finally got it work. Also, with wxRuby version 0.3.0, I tried switching to the vc++ 7.1 compiler (from VS .NET 2003). This also compiled just fine but would not run. At that point I was trying to get the release out as quickly as possible, so I didn''t even try to figure it out -- I just went back to vc++ 6.0 and that worked, once again, without any problems. Hope that helps. Curt
devel@nicreations.com
2004-Jul-20 15:28 UTC
[Wxruby-users] The great MSVC wxruby-swig bug hunt!
Quoting Kevin Smith <wxruby@qualitycode.com>:> Nick wrote: > > It now successfully builds (or should successfully build), but it isn''t > > running. We''re tracking what the problem is, but we could use some help. > > For those of us without MS-Windows boxes, can you describe the symptoms > of the bug(s) you''re seeing with wxruby-swig?Curt, I''ve been using MSVC 6.0 and wxWidgets 2.4.2 from makefiles. Thanks for the suggestions though. The symptom is that wxRuby-swig crashes on load. I''ve loaded it into the Micosoft Debugging Tools for windows, and from what I can see it is being caused by SWIG storing a pointer to a director as a pointer to the base class, and then later trying to re-cast it back to it''s director type, which fails. There are a few open questions though: 1) Is wxWidgets initialized correctly? I had to write the MSVC App.i initialization code, and I''m not confident I did it correctly. Somebody with lower wxWidgets experience should take a look. 2) Is SWIG really at issue here? It''s an easy target, but it''s also possible I didn''t get the proper arguments for MSVC to SWIG. Somebody should check this too. 3) Did I track the bug correctly? Somebody should double check this. I''ll accept any help possible. I''d like to see wxruby-swig on Windows soon! Nick
devel@nicreations.com
2004-Jul-26 13:37 UTC
[Wxruby-users] The great MSVC wxruby-swig bug hunt!
Alright, I found out what was going on. I forgot to turn on RTTI in MSVC so SWIG could work properly. There was also a mixup in App.i that wasn''t kicking off the main loop. So now MSVC has a wxruby-swig window! I am still crashing on program exit (GC issue). I can''t get a MinGW version to build, but it''s because Rake won''t work with MSYS. I need to send an email their way to see if it''s ever been tested with the MinGW toolchain. Also, is there any reason to blow away the lib directory on a clean? I''ve always had problems with that due to MSVC putting more than just the .so file in there. I also suggest changing delete_files_in to: def delete_files_in(dir) Dir[File.join(dir, "*")].each do |f| if !(f =~ /CVS/) force_delete(f) end end end this might make life a little easier. Thats all for now, Nick Quoting Kevin Smith <wxruby@qualitycode.com>:> Nick wrote: > > It now successfully builds (or should successfully build), but it isn''t > > running. We''re tracking what the problem is, but we could use some help. > > For those of us without MS-Windows boxes, can you describe the symptoms > of the bug(s) you''re seeing with wxruby-swig? > > Thanks, > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >
devel@nicreations.com wrote:> > Alright, I found out what was going on. I forgot to turn on RTTI > in MSVC so SWIG > could work properly. There was also a mixup in App.i that wasn''t > kicking off > the main loop. So now MSVC has a wxruby-swig window! > > I am still crashing on program exit (GC issue). I can''t get a > MinGW version to > build, but it''s because Rake won''t work with MSYS. I need to send an email > their way to see if it''s ever been tested with the MinGW toolchain.This is great, Nick! I''m really glad to see you are making some headway. Keep up the good work! Curt
devel@nicreations.com wrote:> Also, is there any reason to blow away the lib directory on a clean? I''ve always > had problems with that due to MSVC putting more than just the .so file in > there. I also suggest changing delete_files_in to:No, there''s no compelling reason to delete the lib directory, and doing so is causing pain. Your proposed rakefile change looks fine. Thanks, Kevini