Has anybody tried the new wxruby-swig from the msvc++ command line compiler using ''rake''? The rakefile seems to depend on the wx_config method, which doesn''t exist for msw because it doesn''t have BASH to execute the shell script. Has anyone hacked the rakefile to fix this? Nick
Nick wrote:> > Has anybody tried the new wxruby-swig from the msvc++ command line > compiler using ''rake''? The rakefile seems to depend on the wx_config > method, which doesn''t exist for msw because it doesn''t have BASH to > execute the shell script. Has anyone hacked the rakefile to fix this?I haven''t yet tried compiling the swig version. I''ll try to get to it this evening, but no promises here (I''m way overbooked -- as usual). Curt
Nick wrote:> Has anybody tried the new wxruby-swig from the msvc++ command line > compiler using ''rake''? The rakefile seems to depend on the wx_config > method, which doesn''t exist for msw because it doesn''t have BASH to > execute the shell script. Has anyone hacked the rakefile to fix this?Thanks for this report! I specifically request the SHELL parameter from Config::CONFIG, and apparently it is not returning "cmd" or whatever the correct prefix is for MS Windows. That seems like a bug in Ruby, to me. You might try changing the wx_config method in rake/rakewx.rb to set shell = ''cmd'' and see if that helps. If that also doesn''t work, I guess I''ll have to move all the wx-config calls inside each platform-specific rakefile. Let me know... Kevin
Nick wrote:> No no no - It''s bigger than that. Unless I''m mistaken, there is no > ''wx-config'' script for MSVC at all. Thats why the wxruby extconf has so > much configurating information in it.Ah. That''s very disappointing.> Right now wxruby-swig is heavily dependent on the existence of > wx-config. It''ll take a day or two to move the extconf system to the > rake system for MSVC.It shouldn''t take that long. I''ll try a first attempt tonight or tomorrow. Until then, I recommend that nobody bother attempting a wxruby-swig build with VC++. I am still interested in Mac and Cygwin attempts, though. Thanks very much, Kevin
> > It shouldn''t take that long. I''ll try a first attempt tonight or > tomorrow. Until then, I recommend that nobody bother attempting a > wxruby-swig build with VC++. I am still interested in Mac and Cygwin > attempts, though.Ok, I''ll give it try when you tell me its ready. (I no longer have cygwin installed so I can''t be of help there). Curt
On 2004 Apr 22, at 10:56, Kevin Smith wrote:> I am still interested in Mac and Cygwin attempts, though.[ryan@kursk 15:34:48 ~/Desktop/wxruby-swig-0.0.4]$ rake (in /Users/ryan/Desktop/wxruby-swig-0.0.4) g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/wx.o src/wx.cpp {standard input}:unknown:FATAL:can''t create output file: obj/wx.o rake aborted! Command Failed: [g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/wx.o src/wx.cpp ] [ryan@kursk 15:34:59 ~/Desktop/wxruby-swig-0.0.4]$ -- Ryan "John" Platte Custom services, NIKA Consulting http://nikaconsulting.com/
On 2004 Apr 22, at 10:56, Kevin Smith wrote:> I am still interested in Mac and Cygwin attempts, though.OK, sent that last one a bit prematurely...fix that little bug and we get further. [ryan@kursk 15:38:03 ~/Desktop/wxruby-swig-0.0.4]$ mkdir obj [ryan@kursk 15:38:16 ~/Desktop/wxruby-swig-0.0.4]$ rake (in /Users/ryan/Desktop/wxruby-swig-0.0.4) g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/wx.o src/wx.cpp g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/RubyConstants.o src/RubyConstants.cpp g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/App.o src/App.cpp g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/Bitmap.o src/Bitmap.cpp src/Bitmap.cpp: In function `VALUE _wrap_new_wxBitmap(int, VALUE*, long unsigned int)'': src/Bitmap.cpp:724: error: call of overloaded `wxBitmap(const wxString&, long int&)'' is ambiguous /usr/local/include/wx/mac/bitmap.h:152: error: candidates are: wxBitmap::wxBitmap(int, int, int = -1) <near match> /usr/local/include/wx/mac/bitmap.h:146: error: wxBitmap::wxBitmap(const wxString&, wxBitmapType wxBITMAP_TYPE_PICT_RESOURCE) <near match> src/Bitmap.cpp: In function `VALUE _wrap_wxBitmap_ConvertToImage(int, VALUE*, long unsigned int)'': src/Bitmap.cpp:737: error: aggregate `wxImage result'' has incomplete type and cannot be defined src/Bitmap.cpp:743: error: invalid use of undefined type `struct wxImage'' /usr/local/include/wx/bitmap.h:31: error: forward declaration of `struct wxImage'' src/Bitmap.cpp:747: error: invalid use of undefined type `struct wxImage'' /usr/local/include/wx/bitmap.h:31: error: forward declaration of `struct wxImage'' src/Bitmap.cpp: In function `VALUE _wrap_wxBitmap_LoadFile(int, VALUE*, long unsigned int)'': src/Bitmap.cpp:916: warning: invalid conversion from `long int'' to ` wxBitmapType'' src/Bitmap.cpp:916: warning: initializing argument 2 of `virtual bool wxBitmap::LoadFile(const wxString&, wxBitmapType)'' src/Bitmap.cpp: In function `VALUE _wrap_wxBitmap_SaveFile(int, VALUE*, long unsigned int)'': src/Bitmap.cpp:958: warning: invalid conversion from `int'' to `wxBitmapType'' src/Bitmap.cpp:958: warning: initializing argument 2 of `virtual bool wxBitmap::SaveFile(const wxString&, wxBitmapType, const wxPalette*) const'' rake aborted! Command Failed: [g++ -c -I/usr/local/lib/wx/include/mac-2.4 -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-common -fno-common -pipe -fno-common -x objective-c++ -I /usr/local/lib/ruby/gems/1.8/rake-0.3.1/lib -I /usr/local/lib/ruby/site_ruby/1.8 -I /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 -I /usr/local/lib/ruby/1.8/powerpc-darwin -I . -o obj/Bitmap.o src/Bitmap.cpp ] [ryan@kursk 15:38:48 ~/Desktop/wxruby-swig-0.0.4]$ -- Ryan "John" Platte Custom services, NIKA Consulting http://nikaconsulting.com/
John Platte wrote:> OK, sent that last one a bit prematurely...fix that little bug and we > get further. > > [ryan@kursk 15:38:03 ~/Desktop/wxruby-swig-0.0.4]$ mkdir objAh. I have updated rakefile and rake/rakewx.rb to automatically create the obj/ and lib/ directories as needed.> src/Bitmap.cpp:724: error: call of overloaded `wxBitmap(const wxString&, > long > int&)'' is ambiguous> src/Bitmap.cpp:916: warning: invalid conversion from `long int'' to ` > wxBitmapType'' > src/Bitmap.cpp:958: warning: invalid conversion from `int'' to > `wxBitmapType'' Ok. The docs specified the type as ''long'' instead of ''wxBitmapType''. Not sure why your compiler complained and mine didn''t, but these three should all be fixed now.> src/Bitmap.cpp: In function `VALUE _wrap_wxBitmap_ConvertToImage(int, > VALUE*, > long unsigned int)'': > src/Bitmap.cpp:737: error: aggregate `wxImage result'' has incomplete > type and > cannot be definedI think/hope/believe I have fixed this, by including wx/image.h. I have pushed wxruby-swig-0.0.5 with all these fixes. Thanks! Kevin
Kevin Smith wrote:> It shouldn''t take that long. I''ll try a first attempt tonight or > tomorrow. Until then, I recommend that nobody bother attempting a > wxruby-swig build with VC++. I am still interested in Mac and Cygwin > attempts, though.Ok. I have NOT pushed a new tarball with these changes, because releasing 0.0.5 and 0.0.6 on the same night seemed like a bit much. :-) However, I have pushed my rakefile changes to the public repo at qualitycode.com, so anyone who is brave can pull rakefile and the rake/ directory, and try them under MSWin. I doubt it will actually completely work, but it should be much closer. I expect to release 0.0.6 within 48 hours, in case you would rather wait. Thanks, Kevin
Kevin Smith wrote:> I expect to release 0.0.6 within 48 hoursOk. 0.0.6 is available, and fixes the rakefile so the MSWin build no longer tries to use wx-config. Kevin
Kevin Smith wrote:> > Ok. 0.0.6 is available, and fixes the rakefile so the MSWin build no > longer tries to use wx-config.I''m trying to build this on windows. First, rakemswin.rb had "=end" on line 61. This was a syntax error, so I deleted that line. Now I get this: E:\Dev\RubyDev\wxruby\wxruby-swig\wxruby-swig-0.0.6>ruby c:\ruby\bin\rake.rb (in E:/Dev/RubyDev/wxruby/wxruby-swig/wxruby-swig-0.0.6) ../rake/rakemswin.rb:35: warning: global variable `$WINFLAGS'' not initialized cpp -c -IE:\Dev\RubyDev\wxruby\wx/include /D__WXMSW__ -D__WXMSW__ -IE:\Dev\RubyD ev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 -DSTRICT -DWIN32 -D__WIN32__ -D_WI NDOWS /D__WINDOWS__ -DWINVER=0x0400 /D__WIN95__ -D_DEBUG -D__WXDEBUG__ -DWXDEBUG =1 -I c:/ruby/lib/ruby/site_ruby/1.8 -I c:/ruby/lib/ruby/site_ruby/1.8/i386-ms vcrt -I c:/ruby/lib/ruby/site_ruby -I c:/ruby/lib/ruby/1.8 -I c:/ruby/lib/ruby/1 ..8/i386-mswin32 -I . -o obj/wx.obj src/wx.cpp Exception `RuntimeError'' at c:/ruby/lib/ruby/site_ruby/1.8/rake.rb:358 - Command Failed: [cpp -c -IE:\Dev\RubyDev\wxruby\wx/include /D__WXMSW__ -D__WXMSW__ -IE: \Dev\RubyDev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 -DSTRICT -DWIN32 -D__WIN 32__ -D_WINDOWS /D__WINDOWS__ -DWINVER=0x0400 /D__WIN95__ -D_DEBUG -D__WXDEBUG__ -DWXDEBUG=1 -I c:/ruby/lib/ruby/site_ruby/1.8 -I c:/ruby/lib/ruby/site_ruby/1 ..8/i386-msvcrt -I c:/ruby/lib/ruby/site_ruby -I c:/ruby/lib/ruby/1.8 -I c:/ruby/ lib/ruby/1.8/i386-mswin32 -I . rake aborted! Command Failed: [cpp -c -IE:\Dev\RubyDev\wxruby\wx/include /D__WXMSW__ -D__WXMSW __ -IE:\Dev\RubyDev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 -DSTRICT -DWIN32 -D__WIN32__ -D_WINDOWS /D__WINDOWS__ -DWINVER=0x0400 /D__WIN95__ -D_DEBUG -D__WX DEBUG__ -DWXDEBUG=1 -I c:/ruby/lib/ruby/site_ruby/1.8 -I c:/ruby/lib/ruby/site _ruby/1.8/i386-msvcrt -I c:/ruby/lib/ruby/site_ruby -I c:/ruby/lib/ruby/1.8 -I c :/ruby/lib/ruby/1.8/i386-mswin32 -I . -o obj/wx.obj src/wx.cpp E:\Dev\RubyDev\wxruby\wxruby-swig\wxruby-swig-0.0.6> Curt
Curt Hibbs wrote:> I''m trying to build this on windows. > > First, rakemswin.rb had "=end" on line 61. This was a syntax error, so I > deleted that line.Ok. I''ll fix that.> Now I get this: > > E:\Dev\RubyDev\wxruby\wxruby-swig\wxruby-swig-0.0.6>ruby c:\ruby\bin\rake.rb > (in E:/Dev/RubyDev/wxruby/wxruby-swig/wxruby-swig-0.0.6) > ../rake/rakemswin.rb:35: warning: global variable `$WINFLAGS'' not initializedOk. I brought $WINFLAGS in from the old stuff, but I couldn''t see how it was getting set. Try deleting the "#$WINFLAGS", at the beginning of the $extra_flags array. When you compile wxRuby 0.3, what flags show up between the -I lib/msw stuff and -DSTRICT? Thanks! Kevin
Kevin Smith wrote:> > Curt Hibbs wrote: > > Ok. I brought $WINFLAGS in from the old stuff, but I couldn''t see how it > was getting set. Try deleting the > "#$WINFLAGS", > at the beginning of the $extra_flags array. > > When you compile wxRuby 0.3, what flags show up between the -I lib/msw > stuff and -DSTRICT?I got rid of the winflags item and now get the error pasted below. Tomorrow I''ll be able to send you the build flags I used for 0.3.0 as I have to restore the system on my notebook from a backup image before I can run the build. Here''s my wxruby-swig console output: E:\Dev\RubyDev\wxruby\wxruby-swig\wxruby-swig-0.0.6>ruby c:\ruby\bin\rake.rb (in E:/Dev/RubyDev/wxruby/wxruby-swig/wxruby-swig-0.0.6) cpp -c -IE:\Dev\RubyDev\wxruby\wx/include /D__WXMSW__ -D__WXMSW__ -IE:\Dev\RubyD ev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 #-DSTRICT -DWIN32 -D__WIN32__ -D_WI NDOWS /D__WINDOWS__ -DWINVER=0x0400 /D__WIN95__ -D_DEBUG -D__WXDEBUG__ -DWXDEBUG =1 -I c:/ruby/lib/ruby/site_ruby/1.8 -I c:/ruby/lib/ruby/site_ruby/1.8/i386-ms vcrt -I c:/ruby/lib/ruby/site_ruby -I c:/ruby/lib/ruby/1.8 -I c:/ruby/lib/ruby/1 ..8/i386-mswin32 -I . -o obj/wx.obj src/wx.cpp Exception `RuntimeError'' at c:/ruby/lib/ruby/site_ruby/1.8/rake.rb:358 - Command Failed: [cpp -c -IE:\Dev\RubyDev\wxruby\wx/include /D__WXMSW__ -D__WXMSW__ -IE: \Dev\RubyDev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 #-DSTRICT -DWIN32 -D__WIN 32__ -D_WINDOWS /D__WINDOWS__ -DWINVER=0x0400 /D__WIN95__ -D_DEBUG -D__WXDEBUG__ -DWXDEBUG=1 -I c:/ruby/lib/ruby/site_ruby/1.8 -I c:/ruby/lib/ruby/site_ruby/1 ..8/i386-msvcrt -I c:/ruby/lib/ruby/site_ruby -I c:/ruby/lib/ruby/1.8 -I c:/ruby/ lib/ruby/1.8/i386-mswin32 -I . rake aborted! Command Failed: [cpp -c -IE:\Dev\RubyDev\wxruby\wx/include /D__WXMSW__ -D__WXMSW __ -IE:\Dev\RubyDev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 #-DSTRICT -DWIN32 -D__WIN32__ -D_WINDOWS /D__WINDOWS__ -DWINVER=0x0400 /D__WIN95__ -D_DEBUG -D__WX DEBUG__ -DWXDEBUG=1 -I c:/ruby/lib/ruby/site_ruby/1.8 -I c:/ruby/lib/ruby/site _ruby/1.8/i386-msvcrt -I c:/ruby/lib/ruby/site_ruby -I c:/ruby/lib/ruby/1.8 -I c :/ruby/lib/ruby/1.8/i386-mswin32 -I . -o obj/wx.obj src/wx.cpp ] E:\Dev\RubyDev\wxruby\wxruby-swig\wxruby-swig-0.0.6> Curt
Curt Hibbs wrote:> I got rid of the winflags item and now get the error pasted below. Tomorrow > I''ll be able to send you the build flags I used for 0.3.0 as I have to > restore the system on my notebook from a backup image before I can run the > build.Ok. It looks like we''re quite close. Rake''s error reporting is weak (it doesn''t print stack traces for exceptions). It looks like the shell execution (the backtick command) is failing, and I think I see why. I had guessed at "cpp" as the compiler name, but it looks like it should be "cl.exe" instead. I also guessed at the linker name, but I think "link" is correct. This should be simple for you to fix. I set my system to pretend to be MSWin, and compared my output to yours. There are two differences (not counting different directory paths):> E:\Dev\RubyDev\wxruby\wxruby-swig\wxruby-swig-0.0.6>ruby c:\ruby\bin\rake.rb > (in E:/Dev/RubyDev/wxruby/wxruby-swig/wxruby-swig-0.0.6) > cpp -c -IE:\Dev\RubyDev\wxruby\wx/include > /D__WXMSW__ -D__WXMSW__ -IE:\Dev\RubyD > ev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 > #-DSTRICT -DWIN32 -D__WIN32__ -D_WINote the # above. That shouldn''t be there. If it''s in your rakefile, you should remove it.> NDOWS /D__WINDOWS__ -DWINVER=0x0400 > /D__WIN95__ -D_DEBUG -D__WXDEBUG__ -DWXDEBUG > =1 -I c:/ruby/lib/ruby/site_ruby/1.8 -I > c:/ruby/lib/ruby/site_ruby/1.8/i386-ms > vcrt -I c:/ruby/lib/ruby/site_ruby -I c:/ruby/lib/ruby/1.8 -I > c:/ruby/lib/ruby/1 > ..8/i386-mswin32 -I . -o obj/wx.obj src/wx.cppNote the .. above, in /1..8/. It shows that way once...> Exception `RuntimeError'' at c:/ruby/lib/ruby/site_ruby/1.8/rake.rb:358 - > Command > Failed: [cpp -c -IE:\Dev\RubyDev\wxruby\wx/include > /D__WXMSW__ -D__WXMSW__ -IE: > \Dev\RubyDev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 > #-DSTRICT -DWIN32 -D__WIN > 32__ -D_WINDOWS /D__WINDOWS__ -DWINVER=0x0400 > /D__WIN95__ -D_DEBUG -D__WXDEBUG__ > -DWXDEBUG=1 -I c:/ruby/lib/ruby/site_ruby/1.8 -I > c:/ruby/lib/ruby/site_ruby/1 > ..8/i386-msvcrt -I c:/ruby/lib/ruby/site_ruby -I c:/ruby/lib/ruby/1.8 -I...twice...> c:/ruby/ > lib/ruby/1.8/i386-mswin32 -I . rake aborted! > Command Failed: [cpp -c -IE:\Dev\RubyDev\wxruby\wx/include > /D__WXMSW__ -D__WXMSW > __ -IE:\Dev\RubyDev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 > #-DSTRICT -DWIN32 > -D__WIN32__ -D_WINDOWS /D__WINDOWS__ -DWINVER=0x0400 > /D__WIN95__ -D_DEBUG -D__WX > DEBUG__ -DWXDEBUG=1 -I c:/ruby/lib/ruby/site_ruby/1.8 -I > c:/ruby/lib/ruby/site > _ruby/1.8/i386-msvcrt -I c:/ruby/lib/ruby/site_ruby -I > c:/ruby/lib/ruby/1.8 -I c > :/ruby/lib/ruby/1.8/i386-mswin32 -I . -o obj/wx.obj src/wx.cpp ]...but not the third time, which makes me suspect it is just some weird output formatting error. Thanks again, Kevin