> I am compiling wxRuby 0.4.0 on WinXP Home under MingW and MSYS 1.0. Ican> compile wxWindows and Ruby fine and I get about 20 minutes into thewxRuby> compile and it quits, It says:[snip]>C:\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe :> cannot find -lwxmsw241d > make: *** [wxruby.so] Error 1> I replaced the $LIBS in the extconf.rb file per instructions because I > compiled wxwindows with debugging.Silly question: have you build the wxWidgets in debug mode? Is the wxmsw241d (wxWidgets-MSWindows-2.4.1-debug) dll/lib files in the includes path?
I''m at work now....and I''m trying the recompile again(the other post I was at home).... Here is my first problem, when i run "ruby extconf.rb" , then "make", make always quits because it can''t any of the "wx.*" files. Last night I had copied over the wx directory from the wxWindows-2.4.2 directory into the "wxruby" directory to get this part of the process to work. What can i pass to extconf.rb or make to tell it where the /wx files are? TIA, Zach Mehr, Assaph (Assaph) wrote:>>I am compiling wxRuby 0.4.0 on WinXP Home under MingW and MSYS 1.0. I >> >> >can > > >>compile wxWindows and Ruby fine and I get about 20 minutes into the >> >> >wxRuby > > >>compile and it quits, It says: >> >> > >[snip] > > > >C:\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe >: > > >>cannot find -lwxmsw241d >>make: *** [wxruby.so] Error 1 >> >> > > > >>I replaced the $LIBS in the extconf.rb file per instructions because I >>compiled wxwindows with debugging. >> >> > > >Silly question: have you build the wxWidgets in debug mode? Is the >wxmsw241d (wxWidgets-MSWindows-2.4.1-debug) dll/lib files in the >includes path? > >_______________________________________________ >wxruby-users mailing list >wxruby-users@rubyforge.org >http://rubyforge.org/mailman/listinfo/wxruby-users > > > >
Zach Dennis wrote:> > I''m at work now....and I''m trying the recompile again(the other post I > was at home).... > > Here is my first problem, when i run "ruby extconf.rb" , then "make", > make always quits because it can''t any of the "wx.*" files. Last night I > had copied over the wx directory from the wxWindows-2.4.2 directory into > the "wxruby" directory to get this part of the process to work. > > What can i pass to extconf.rb or make to tell it where the /wx files are?You''re supposed to set the environment variable WXWIN to the base WxWindows directory. You can find this in the README.mingw file by searching for WXWIN. Curt
That has already been set to the proper directory. If you notice the make is looking for a relative "wx" directory, and not hte "/wx" directory ------------- zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src $ env ......-----cut for breviy---........ WXWIN=/wx MAKE_MODE=unix APPDATA=C:\Documents and Settings\Administrator\Application Data COMMONPROGRAMFILES=C:\Program Files\Common Files HOMEPATH=\ USERDOMAIN=SILVER USERNAME=zdennis SHELL=/bin/sh HOSTTYPE=i686 OSTYPE=msys TERM=msys HOME=/home/zdennis BGCOLOR=LightYellow PATH=.:/usr/local/bin:/mingw/bin:/bin:/c/WINNT/system32:/c/WINNT:/c/WINNT/system32/WBEM:/c/Python23:/c/usr/local/bin:/c/j2sdk1.4.2_03/bin:/ zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src $ make g++ -g -O2 -I/usr/local/lib/wx/include/msw-2.4 -D__WXMSW__ -mthreads -DWXUSINGDLL=1 -fno-pcc-struct-return -I. -Ic:/usr/local/lib/ruby/1.8/i386-mingw32 -Ic:/usr/local/lib/ruby/1.8/i386-mingw32 -I. -c wx.cpp In file included from wx.cpp:14: wx.h:16:19: wx/wx.h: No such file or directory In file included from wx.h:19, from wx.cpp:14: dynamiccast.h:15:19: wx/wx.h: No such file or directory dynamiccast.h:16:21: wx/hash.h: No such file or directory In file included from wx.h:19, from wx.cpp:14: dynamiccast.h:22: parse error before `{'' token dynamiccast.h:28: parse error before `)'' token dynamiccast.h:32: `wxObject'' was not declared in this scope dynamiccast.h:32: parse error before `)'' token dynamiccast.h:32: virtual outside class declaration dynamiccast.h:32: function `VALUE ToValue(...)'' is initialized like a variable dynamiccast.h:33: parse error before `}'' token dynamiccast.h:36: base class `WxTypeConverter'' has incomplete type dynamiccast.h:38: ''wxString'' is used as a type, but is not defined as a type. dynamiccast.h:41: parse error before `&'' token dynamiccast.h:41: missing '';'' before right brace dynamiccast.h:42: `wxObject'' was not declared in this scope dynamiccast.h:42: `cppObject'' was not declared in this scope dynamiccast.h:43: `VALUE ToValue'' redeclared as different kind of symbol dynamiccast.h:32: previous declaration of `VALUE ToValue(...)'' dynamiccast.h:43: syntax error before `{'' token dynamiccast.h:46: `T'' was not declared in this scope dynamiccast.h:46: parse error before `::'' token dynamiccast.h:47: parse error before `*'' token dynamiccast.h:56: ISO C++ forbids declaration of `wxHashTable'' with no type dynamiccast.h:56: parse error before `;'' token dynamiccast.h:59: `wxObject'' was not declared in this scope dynamiccast.h:59: parse error before `)'' token wx.cpp:18:28: wx/msw/private.h: No such file or directory wx.cpp: In function `BOOL DllMain(void*, long unsigned int, void*)'': wx.cpp:50: `wxSetInstance'' undeclared (first use this function) wx.cpp:50: (Each undeclared identifier is reported only once for each function it appears in.) make: *** [wx.o] Error 1 zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src $ Zach Curt Hibbs wrote:>Zach Dennis wrote: > > >>I''m at work now....and I''m trying the recompile again(the other post I >>was at home).... >> >>Here is my first problem, when i run "ruby extconf.rb" , then "make", >>make always quits because it can''t any of the "wx.*" files. Last night I >>had copied over the wx directory from the wxWindows-2.4.2 directory into >>the "wxruby" directory to get this part of the process to work. >> >>What can i pass to extconf.rb or make to tell it where the /wx files are? >> >> > >You''re supposed to set the environment variable WXWIN to the base WxWindows >directory. You can find this in the README.mingw file by searching for >WXWIN. > >Curt > >_______________________________________________ >wxruby-users mailing list >wxruby-users@rubyforge.org >http://rubyforge.org/mailman/listinfo/wxruby-users > > > >
I''m not a mingw user, so I probably can''t help. Here''s a question from my own mingw ignorance... should WXWIN be set to "/c/wx" ??? Curt> -----Original Message----- > From: wxruby-users-bounces@rubyforge.org > [mailto:wxruby-users-bounces@rubyforge.org]On Behalf Of Zach Dennis > Sent: Friday, August 06, 2004 2:31 PM > To: General discussion of wxRuby > Subject: Re: [Wxruby-users] 0.4.0 Compiling Under Mingw > > > That has already been set to the proper directory. If you notice the > make is looking for a relative "wx" directory, and not hte "/wx" directory > > ------------- > zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src > $ env > ......-----cut for breviy---........ > WXWIN=/wx > MAKE_MODE=unix > APPDATA=C:\Documents and Settings\Administrator\Application Data > COMMONPROGRAMFILES=C:\Program Files\Common Files > HOMEPATH=\ > USERDOMAIN=SILVER > USERNAME=zdennis > SHELL=/bin/sh > HOSTTYPE=i686 > OSTYPE=msys > TERM=msys > HOME=/home/zdennis > BGCOLOR=LightYellow > PATH=.:/usr/local/bin:/mingw/bin:/bin:/c/WINNT/system32:/c/WINNT:/ > c/WINNT/system32/WBEM:/c/Python23:/c/usr/local/bin:/c/j2sdk1.4.2_03/bin:/ > > zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src > $ make > g++ -g -O2 -I/usr/local/lib/wx/include/msw-2.4 -D__WXMSW__ -mthreads > -DWXUSINGDLL=1 -fno-pcc-struct-return -I. > -Ic:/usr/local/lib/ruby/1.8/i386-mingw32 > -Ic:/usr/local/lib/ruby/1.8/i386-mingw32 -I. -c wx.cpp > In file included from wx.cpp:14: > wx.h:16:19: wx/wx.h: No such file or directory > In file included from wx.h:19, > from wx.cpp:14: > dynamiccast.h:15:19: wx/wx.h: No such file or directory > dynamiccast.h:16:21: wx/hash.h: No such file or directory > In file included from wx.h:19, > from wx.cpp:14: > dynamiccast.h:22: parse error before `{'' token > dynamiccast.h:28: parse error before `)'' token > dynamiccast.h:32: `wxObject'' was not declared in this scope > dynamiccast.h:32: parse error before `)'' token > dynamiccast.h:32: virtual outside class declaration > dynamiccast.h:32: function `VALUE ToValue(...)'' is initialized like a > variable > dynamiccast.h:33: parse error before `}'' token > dynamiccast.h:36: base class `WxTypeConverter'' has incomplete type > dynamiccast.h:38: ''wxString'' is used as a type, but is not defined as a > type. > dynamiccast.h:41: parse error before `&'' token > dynamiccast.h:41: missing '';'' before right brace > dynamiccast.h:42: `wxObject'' was not declared in this scope > dynamiccast.h:42: `cppObject'' was not declared in this scope > dynamiccast.h:43: `VALUE ToValue'' redeclared as different kind of symbol > dynamiccast.h:32: previous declaration of `VALUE ToValue(...)'' > dynamiccast.h:43: syntax error before `{'' token > dynamiccast.h:46: `T'' was not declared in this scope > dynamiccast.h:46: parse error before `::'' token > dynamiccast.h:47: parse error before `*'' token > dynamiccast.h:56: ISO C++ forbids declaration of `wxHashTable'' > with no type > dynamiccast.h:56: parse error before `;'' token > dynamiccast.h:59: `wxObject'' was not declared in this scope > dynamiccast.h:59: parse error before `)'' token > wx.cpp:18:28: wx/msw/private.h: No such file or directory > wx.cpp: In function `BOOL DllMain(void*, long unsigned int, void*)'': > wx.cpp:50: `wxSetInstance'' undeclared (first use this function) > wx.cpp:50: (Each undeclared identifier is reported only once for each > function > it appears in.) > make: *** [wx.o] Error 1 > > zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src > $ > > > Zach > > > Curt Hibbs wrote: > > >Zach Dennis wrote: > > > > > >>I''m at work now....and I''m trying the recompile again(the other post I > >>was at home).... > >> > >>Here is my first problem, when i run "ruby extconf.rb" , then "make", > >>make always quits because it can''t any of the "wx.*" files. Last night I > >>had copied over the wx directory from the wxWindows-2.4.2 directory into > >>the "wxruby" directory to get this part of the process to work. > >> > >>What can i pass to extconf.rb or make to tell it where the /wx > files are? > >> > >> > > > >You''re supposed to set the environment variable WXWIN to the > base WxWindows > >directory. You can find this in the README.mingw file by searching for > >WXWIN. > > > >Curt > > > >_______________________________________________ > >wxruby-users mailing list > >wxruby-users@rubyforge.org > >http://rubyforge.org/mailman/listinfo/wxruby-users > > > > > > > > > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.717 / Virus Database: 473 - Release Date: 7/8/2004 >
I still can''t get the WXWIN variable to mean anything in my MSYS environment but i was able to get wxruby to compile. I set the LIBS variable in the extconf.rb to match the name of my wxWindows dll file. It looks like the README.mingw file was written when 2.4.1 was out, since I''m using wxWindows 2.4.2 and I didn''t put 2 and 2 together at first. Thanks Curt for your help. Zach Curt Hibbs wrote:>I''m not a mingw user, so I probably can''t help. Here''s a question from my >own mingw ignorance... should WXWIN be set to "/c/wx" ??? > >Curt > > > >>-----Original Message----- >>From: wxruby-users-bounces@rubyforge.org >>[mailto:wxruby-users-bounces@rubyforge.org]On Behalf Of Zach Dennis >>Sent: Friday, August 06, 2004 2:31 PM >>To: General discussion of wxRuby >>Subject: Re: [Wxruby-users] 0.4.0 Compiling Under Mingw >> >> >>That has already been set to the proper directory. If you notice the >>make is looking for a relative "wx" directory, and not hte "/wx" directory >> >>------------- >>zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src >>$ env >>......-----cut for breviy---........ >>WXWIN=/wx >>MAKE_MODE=unix >>APPDATA=C:\Documents and Settings\Administrator\Application Data >>COMMONPROGRAMFILES=C:\Program Files\Common Files >>HOMEPATH=\ >>USERDOMAIN=SILVER >>USERNAME=zdennis >>SHELL=/bin/sh >>HOSTTYPE=i686 >>OSTYPE=msys >>TERM=msys >>HOME=/home/zdennis >>BGCOLOR=LightYellow >>PATH=.:/usr/local/bin:/mingw/bin:/bin:/c/WINNT/system32:/c/WINNT:/ >>c/WINNT/system32/WBEM:/c/Python23:/c/usr/local/bin:/c/j2sdk1.4.2_03/bin:/ >> >>zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src >>$ make >>g++ -g -O2 -I/usr/local/lib/wx/include/msw-2.4 -D__WXMSW__ -mthreads >>-DWXUSINGDLL=1 -fno-pcc-struct-return -I. >>-Ic:/usr/local/lib/ruby/1.8/i386-mingw32 >>-Ic:/usr/local/lib/ruby/1.8/i386-mingw32 -I. -c wx.cpp >>In file included from wx.cpp:14: >>wx.h:16:19: wx/wx.h: No such file or directory >>In file included from wx.h:19, >> from wx.cpp:14: >>dynamiccast.h:15:19: wx/wx.h: No such file or directory >>dynamiccast.h:16:21: wx/hash.h: No such file or directory >>In file included from wx.h:19, >> from wx.cpp:14: >>dynamiccast.h:22: parse error before `{'' token >>dynamiccast.h:28: parse error before `)'' token >>dynamiccast.h:32: `wxObject'' was not declared in this scope >>dynamiccast.h:32: parse error before `)'' token >>dynamiccast.h:32: virtual outside class declaration >>dynamiccast.h:32: function `VALUE ToValue(...)'' is initialized like a >>variable >>dynamiccast.h:33: parse error before `}'' token >>dynamiccast.h:36: base class `WxTypeConverter'' has incomplete type >>dynamiccast.h:38: ''wxString'' is used as a type, but is not defined as a >>type. >>dynamiccast.h:41: parse error before `&'' token >>dynamiccast.h:41: missing '';'' before right brace >>dynamiccast.h:42: `wxObject'' was not declared in this scope >>dynamiccast.h:42: `cppObject'' was not declared in this scope >>dynamiccast.h:43: `VALUE ToValue'' redeclared as different kind of symbol >>dynamiccast.h:32: previous declaration of `VALUE ToValue(...)'' >>dynamiccast.h:43: syntax error before `{'' token >>dynamiccast.h:46: `T'' was not declared in this scope >>dynamiccast.h:46: parse error before `::'' token >>dynamiccast.h:47: parse error before `*'' token >>dynamiccast.h:56: ISO C++ forbids declaration of `wxHashTable'' >>with no type >>dynamiccast.h:56: parse error before `;'' token >>dynamiccast.h:59: `wxObject'' was not declared in this scope >>dynamiccast.h:59: parse error before `)'' token >>wx.cpp:18:28: wx/msw/private.h: No such file or directory >>wx.cpp: In function `BOOL DllMain(void*, long unsigned int, void*)'': >>wx.cpp:50: `wxSetInstance'' undeclared (first use this function) >>wx.cpp:50: (Each undeclared identifier is reported only once for each >>function >> it appears in.) >>make: *** [wx.o] Error 1 >> >>zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src >>$ >> >> >>Zach >> >> >>Curt Hibbs wrote: >> >> >> >>>Zach Dennis wrote: >>> >>> >>> >>> >>>>I''m at work now....and I''m trying the recompile again(the other post I >>>>was at home).... >>>> >>>>Here is my first problem, when i run "ruby extconf.rb" , then "make", >>>>make always quits because it can''t any of the "wx.*" files. Last night I >>>>had copied over the wx directory from the wxWindows-2.4.2 directory into >>>>the "wxruby" directory to get this part of the process to work. >>>> >>>>What can i pass to extconf.rb or make to tell it where the /wx >>>> >>>> >>files are? >> >> >>>> >>>> >>>You''re supposed to set the environment variable WXWIN to the >>> >>> >>base WxWindows >> >> >>>directory. You can find this in the README.mingw file by searching for >>>WXWIN. >>> >>>Curt >>> >>>_______________________________________________ >>>wxruby-users mailing list >>>wxruby-users@rubyforge.org >>>http://rubyforge.org/mailman/listinfo/wxruby-users >>> >>> >>> >>> >>> >>> >>_______________________________________________ >>wxruby-users mailing list >>wxruby-users@rubyforge.org >>http://rubyforge.org/mailman/listinfo/wxruby-users >> >>--- >>Incoming mail is certified Virus Free. >>Checked by AVG anti-virus system (http://www.grisoft.com). >>Version: 6.0.717 / Virus Database: 473 - Release Date: 7/8/2004 >> >> >> > >_______________________________________________ >wxruby-users mailing list >wxruby-users@rubyforge.org >http://rubyforge.org/mailman/listinfo/wxruby-users > > > >
I spoked to soon....the wxruby.so compiled and installed fine, but it doesn''t run!! ---------- Capture Output ---------- "C:\usr\local\bin\ruby.exe" football.rb C:/usr/local/lib/ruby/site_ruby/1.8/i386-msvcrt/wxruby.so: 126: The specified module could not be found. - C:/usr/local/lib/ruby/site_ruby/1.8/i386-msvcrt/wxruby.so (LoadError) from football.rb:2 Terminated with exit code 1 ----------End Output-------------- Any ideas on this one? Zach Zach Dennis wrote:> I still can''t get the WXWIN variable to mean anything in my MSYS > environment but i was able to get wxruby to compile. I set the LIBS > variable in the extconf.rb to match the name of my wxWindows dll file. > It looks like the README.mingw file was written when 2.4.1 was out, > since I''m using wxWindows 2.4.2 and I didn''t put 2 and 2 together at > first. > > Thanks Curt for your help. > > Zach > > Curt Hibbs wrote: > >> I''m not a mingw user, so I probably can''t help. Here''s a question >> from my >> own mingw ignorance... should WXWIN be set to "/c/wx" ??? >> >> Curt >> >> >> >>> -----Original Message----- >>> From: wxruby-users-bounces@rubyforge.org >>> [mailto:wxruby-users-bounces@rubyforge.org]On Behalf Of Zach Dennis >>> Sent: Friday, August 06, 2004 2:31 PM >>> To: General discussion of wxRuby >>> Subject: Re: [Wxruby-users] 0.4.0 Compiling Under Mingw >>> >>> >>> That has already been set to the proper directory. If you notice the >>> make is looking for a relative "wx" directory, and not hte "/wx" >>> directory >>> >>> ------------- >>> zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src >>> $ env >>> ......-----cut for breviy---........ >>> WXWIN=/wx >>> MAKE_MODE=unix >>> APPDATA=C:\Documents and Settings\Administrator\Application Data >>> COMMONPROGRAMFILES=C:\Program Files\Common Files >>> HOMEPATH=\ >>> USERDOMAIN=SILVER >>> USERNAME=zdennis >>> SHELL=/bin/sh >>> HOSTTYPE=i686 >>> OSTYPE=msys >>> TERM=msys >>> HOME=/home/zdennis >>> BGCOLOR=LightYellow >>> PATH=.:/usr/local/bin:/mingw/bin:/bin:/c/WINNT/system32:/c/WINNT:/ >>> c/WINNT/system32/WBEM:/c/Python23:/c/usr/local/bin:/c/j2sdk1.4.2_03/bin:/ >>> >>> >>> zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src >>> $ make >>> g++ -g -O2 -I/usr/local/lib/wx/include/msw-2.4 -D__WXMSW__ -mthreads >>> -DWXUSINGDLL=1 -fno-pcc-struct-return -I. >>> -Ic:/usr/local/lib/ruby/1.8/i386-mingw32 >>> -Ic:/usr/local/lib/ruby/1.8/i386-mingw32 -I. -c wx.cpp >>> In file included from wx.cpp:14: >>> wx.h:16:19: wx/wx.h: No such file or directory >>> In file included from wx.h:19, >>> from wx.cpp:14: >>> dynamiccast.h:15:19: wx/wx.h: No such file or directory >>> dynamiccast.h:16:21: wx/hash.h: No such file or directory >>> In file included from wx.h:19, >>> from wx.cpp:14: >>> dynamiccast.h:22: parse error before `{'' token >>> dynamiccast.h:28: parse error before `)'' token >>> dynamiccast.h:32: `wxObject'' was not declared in this scope >>> dynamiccast.h:32: parse error before `)'' token >>> dynamiccast.h:32: virtual outside class declaration >>> dynamiccast.h:32: function `VALUE ToValue(...)'' is initialized like a >>> variable >>> dynamiccast.h:33: parse error before `}'' token >>> dynamiccast.h:36: base class `WxTypeConverter'' has incomplete type >>> dynamiccast.h:38: ''wxString'' is used as a type, but is not defined as a >>> type. >>> dynamiccast.h:41: parse error before `&'' token >>> dynamiccast.h:41: missing '';'' before right brace >>> dynamiccast.h:42: `wxObject'' was not declared in this scope >>> dynamiccast.h:42: `cppObject'' was not declared in this scope >>> dynamiccast.h:43: `VALUE ToValue'' redeclared as different kind of >>> symbol >>> dynamiccast.h:32: previous declaration of `VALUE ToValue(...)'' >>> dynamiccast.h:43: syntax error before `{'' token >>> dynamiccast.h:46: `T'' was not declared in this scope >>> dynamiccast.h:46: parse error before `::'' token >>> dynamiccast.h:47: parse error before `*'' token >>> dynamiccast.h:56: ISO C++ forbids declaration of `wxHashTable'' >>> with no type >>> dynamiccast.h:56: parse error before `;'' token >>> dynamiccast.h:59: `wxObject'' was not declared in this scope >>> dynamiccast.h:59: parse error before `)'' token >>> wx.cpp:18:28: wx/msw/private.h: No such file or directory >>> wx.cpp: In function `BOOL DllMain(void*, long unsigned int, void*)'': >>> wx.cpp:50: `wxSetInstance'' undeclared (first use this function) >>> wx.cpp:50: (Each undeclared identifier is reported only once for each >>> function >>> it appears in.) >>> make: *** [wx.o] Error 1 >>> >>> zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src >>> $ >>> >>> >>> Zach >>> >>> >>> Curt Hibbs wrote: >>> >>> >>> >>>> Zach Dennis wrote: >>>> >>>> >>>> >>>> >>>>> I''m at work now....and I''m trying the recompile again(the other >>>>> post I >>>>> was at home).... >>>>> >>>>> Here is my first problem, when i run "ruby extconf.rb" , then "make", >>>>> make always quits because it can''t any of the "wx.*" files. Last >>>>> night I >>>>> had copied over the wx directory from the wxWindows-2.4.2 >>>>> directory into >>>>> the "wxruby" directory to get this part of the process to work. >>>>> >>>>> What can i pass to extconf.rb or make to tell it where the /wx >>>>> >>>> >>> files are? >>> >>> >>>>> >>>> >>>> You''re supposed to set the environment variable WXWIN to the >>>> >>> >>> base WxWindows >>> >>> >>>> directory. You can find this in the README.mingw file by searching for >>>> WXWIN. >>>> >>>> Curt >>>> >>>> _______________________________________________ >>>> wxruby-users mailing list >>>> wxruby-users@rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/wxruby-users >>>> >>>> >>>> >>>> >>>> >>> >>> _______________________________________________ >>> wxruby-users mailing list >>> wxruby-users@rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wxruby-users >>> >>> --- >>> Incoming mail is certified Virus Free. >>> Checked by AVG anti-virus system (http://www.grisoft.com). >>> Version: 6.0.717 / Virus Database: 473 - Release Date: 7/8/2004 >>> >>> >> >> >> _______________________________________________ >> wxruby-users mailing list >> wxruby-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/wxruby-users >> >> >> >> > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > >
I''m writing a custom little application for my boss''s high school football team to track there stats play by play. My problem is that when I start the application, it immediately prompts the user with a modal Dialog asking the User who the opponent is. If the User clicks cancel the modal quits. If the User clicks ''ok'' then it is supposed to update the Game. I never get to that "update" point though. Here''s a snippet of what I have: def Game.start popup = Wx::Dialog.new( @frame , -1 , "Who''s Our Opponent" , Wx::Point.new( 300 , 300 ) , Wx::Size.new( 300 , 130 )); cancel_btn = Wx::Button.new( popup , -1 , "&Cancel" , Wx::Point.new( 150 , 75 ) , Wx::Size.new( 60 , 25 ) ); ok_btn = Wx::Button.new( popup , -1 , "&Ok" , Wx::Point.new( 225 , 75 ) , Wx::Size.new( 60 , 25 ) ); cancel_btn.evt_button( cancel_btn.get_id() ){ |e| exit(0); } ok_btn.evt_button( ok_btn.get_id() ){ |e| Game.updateOpponent( input_txt.get_value() ); popup.end_modal( Wx::ID_OK ); } popup.show_modal(); end Any idea''s why my end_modal quits the entire application? Thanks, Zach
Hi Zach It seems to work as I''d expect - if I click Cancel, the application exits, if I click OK it runs that bit of code and closes the dialog, and if I close the dialog using the button on the top-right, it just closes and the application carries on. Perhaps your Game code is exiting? What are you seeing that you don''t expect? By the way, WxRuby has classes to make standard dialogs like OK/Cancel and Yes/No/Cancel very easy to use, so you don''t need to construct and place your own buttons and hook up your own events. You might be interested in: http://wxruby.rubyforge.org/wiki/wiki.pl?Using_Dialogs_To_Talk_To_Users cheers alex Zach Dennis wrote:> I''m writing a custom little application for my boss''s high school > football team to track there stats play by play. > > My problem is that when I start the application, it immediately prompts > the user with a modal Dialog asking the User who the opponent is. If the > User clicks cancel the modal quits. If the User clicks ''ok'' then it is > supposed to update the Game. I never get to that "update" point though. > > Here''s a snippet of what I have: > > def Game.start > popup = Wx::Dialog.new( @frame , -1 , "Who''s Our Opponent" , > Wx::Point.new( 300 , 300 ) , Wx::Size.new( 300 , 130 )); > cancel_btn = Wx::Button.new( popup , -1 , "&Cancel" , Wx::Point.new( > 150 , 75 ) , > Wx::Size.new( 60 , 25 ) ); > ok_btn = Wx::Button.new( popup , -1 , "&Ok" , Wx::Point.new( 225 , 75 > ) , > Wx::Size.new( 60 , 25 ) ); > > cancel_btn.evt_button( cancel_btn.get_id() ){ |e| exit(0); } > ok_btn.evt_button( ok_btn.get_id() ){ |e| > Game.updateOpponent( input_txt.get_value() ); > popup.end_modal( Wx::ID_OK ); } > > popup.show_modal(); > end > > Any idea''s why my end_modal quits the entire application? Thanks, > > Zach > > > > > > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > >
With MinGW, you don''t use the WXWIN environment variable. Instead, you make sure wx-config is in the path (this is done when you run ''configure/make/make install'' from msys), and wxruby should find it for you.> I spoked to soon....the wxruby.so compiled and installed fine, but it > doesn''t run!! > > ---------- Capture Output ---------- > "C:\usr\local\bin\ruby.exe" football.rb > C:/usr/local/lib/ruby/site_ruby/1.8/i386-msvcrt/wxruby.so: 126: The > specified module could not be found. - > C:/usr/local/lib/ruby/site_ruby/1.8/i386-msvcrt/wxruby.so (LoadError) > from football.rb:2 > > Terminated with exit code 1 > ----------End Output-------------- > > Any ideas on this one? > > Zach > > > > Zach Dennis wrote: > > > I still can''t get the WXWIN variable to mean anything in my MSYS > > environment but i was able to get wxruby to compile. I set the LIBS > > variable in the extconf.rb to match the name of my wxWindows dll file. > > It looks like the README.mingw file was written when 2.4.1 was out, > > since I''m using wxWindows 2.4.2 and I didn''t put 2 and 2 together at > > first. > > > > Thanks Curt for your help. > > > > Zach > > > > Curt Hibbs wrote: > > > >> I''m not a mingw user, so I probably can''t help. Here''s a question > >> from my > >> own mingw ignorance... should WXWIN be set to "/c/wx" ??? > >> > >> Curt > >> > >> > >> > >>> -----Original Message----- > >>> From: wxruby-users-bounces@rubyforge.org > >>> [mailto:wxruby-users-bounces@rubyforge.org]On Behalf Of Zach Dennis > >>> Sent: Friday, August 06, 2004 2:31 PM > >>> To: General discussion of wxRuby > >>> Subject: Re: [Wxruby-users] 0.4.0 Compiling Under Mingw > >>> > >>> > >>> That has already been set to the proper directory. If you notice the > >>> make is looking for a relative "wx" directory, and not hte "/wx" > >>> directory > >>> > >>> ------------- > >>> zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src > >>> $ env > >>> ......-----cut for breviy---........ > >>> WXWIN=/wx > >>> MAKE_MODE=unix > >>> APPDATA=C:\Documents and Settings\Administrator\Application Data > >>> COMMONPROGRAMFILES=C:\Program Files\Common Files > >>> HOMEPATH=\ > >>> USERDOMAIN=SILVER > >>> USERNAME=zdennis > >>> SHELL=/bin/sh > >>> HOSTTYPE=i686 > >>> OSTYPE=msys > >>> TERM=msys > >>> HOME=/home/zdennis > >>> BGCOLOR=LightYellow > >>> PATH=.:/usr/local/bin:/mingw/bin:/bin:/c/WINNT/system32:/c/WINNT:/ > >>> c/WINNT/system32/WBEM:/c/Python23:/c/usr/local/bin:/c/j2sdk1.4.2_03/bin:/ > >>> > >>> > >>> zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src > >>> $ make > >>> g++ -g -O2 -I/usr/local/lib/wx/include/msw-2.4 -D__WXMSW__ -mthreads > >>> -DWXUSINGDLL=1 -fno-pcc-struct-return -I. > >>> -Ic:/usr/local/lib/ruby/1.8/i386-mingw32 > >>> -Ic:/usr/local/lib/ruby/1.8/i386-mingw32 -I. -c wx.cpp > >>> In file included from wx.cpp:14: > >>> wx.h:16:19: wx/wx.h: No such file or directory > >>> In file included from wx.h:19, > >>> from wx.cpp:14: > >>> dynamiccast.h:15:19: wx/wx.h: No such file or directory > >>> dynamiccast.h:16:21: wx/hash.h: No such file or directory > >>> In file included from wx.h:19, > >>> from wx.cpp:14: > >>> dynamiccast.h:22: parse error before `{'' token > >>> dynamiccast.h:28: parse error before `)'' token > >>> dynamiccast.h:32: `wxObject'' was not declared in this scope > >>> dynamiccast.h:32: parse error before `)'' token > >>> dynamiccast.h:32: virtual outside class declaration > >>> dynamiccast.h:32: function `VALUE ToValue(...)'' is initialized like a > >>> variable > >>> dynamiccast.h:33: parse error before `}'' token > >>> dynamiccast.h:36: base class `WxTypeConverter'' has incomplete type > >>> dynamiccast.h:38: ''wxString'' is used as a type, but is not defined as a > >>> type. > >>> dynamiccast.h:41: parse error before `&'' token > >>> dynamiccast.h:41: missing '';'' before right brace > >>> dynamiccast.h:42: `wxObject'' was not declared in this scope > >>> dynamiccast.h:42: `cppObject'' was not declared in this scope > >>> dynamiccast.h:43: `VALUE ToValue'' redeclared as different kind of > >>> symbol > >>> dynamiccast.h:32: previous declaration of `VALUE ToValue(...)'' > >>> dynamiccast.h:43: syntax error before `{'' token > >>> dynamiccast.h:46: `T'' was not declared in this scope > >>> dynamiccast.h:46: parse error before `::'' token > >>> dynamiccast.h:47: parse error before `*'' token > >>> dynamiccast.h:56: ISO C++ forbids declaration of `wxHashTable'' > >>> with no type > >>> dynamiccast.h:56: parse error before `;'' token > >>> dynamiccast.h:59: `wxObject'' was not declared in this scope > >>> dynamiccast.h:59: parse error before `)'' token > >>> wx.cpp:18:28: wx/msw/private.h: No such file or directory > >>> wx.cpp: In function `BOOL DllMain(void*, long unsigned int, void*)'': > >>> wx.cpp:50: `wxSetInstance'' undeclared (first use this function) > >>> wx.cpp:50: (Each undeclared identifier is reported only once for each > >>> function > >>> it appears in.) > >>> make: *** [wx.o] Error 1 > >>> > >>> zdennis@SILVER /c/downloads/wxruby-0.4.0-src/src > >>> $ > >>> > >>> > >>> Zach > >>> > >>> > >>> Curt Hibbs wrote: > >>> > >>> > >>> > >>>> Zach Dennis wrote: > >>>> > >>>> > >>>> > >>>> > >>>>> I''m at work now....and I''m trying the recompile again(the other > >>>>> post I > >>>>> was at home).... > >>>>> > >>>>> Here is my first problem, when i run "ruby extconf.rb" , then "make", > >>>>> make always quits because it can''t any of the "wx.*" files. Last > >>>>> night I > >>>>> had copied over the wx directory from the wxWindows-2.4.2 > >>>>> directory into > >>>>> the "wxruby" directory to get this part of the process to work. > >>>>> > >>>>> What can i pass to extconf.rb or make to tell it where the /wx > >>>>> > >>>> > >>> files are? > >>> > >>> > >>>>> > >>>> > >>>> You''re supposed to set the environment variable WXWIN to the > >>>> > >>> > >>> base WxWindows > >>> > >>> > >>>> directory. You can find this in the README.mingw file by searching for > >>>> WXWIN. > >>>> > >>>> Curt > >>>> > >>>> _______________________________________________ > >>>> wxruby-users mailing list > >>>> wxruby-users@rubyforge.org > >>>> http://rubyforge.org/mailman/listinfo/wxruby-users > >>>> > >>>> > >>>> > >>>> > >>>> > >>> > >>> _______________________________________________ > >>> wxruby-users mailing list > >>> wxruby-users@rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/wxruby-users > >>> > >>> --- > >>> Incoming mail is certified Virus Free. > >>> Checked by AVG anti-virus system (http://www.grisoft.com). > >>> Version: 6.0.717 / Virus Database: 473 - Release Date: 7/8/2004 > >>> > >>> > >> > >> > >> _______________________________________________ > >> wxruby-users mailing list > >> wxruby-users@rubyforge.org > >> http://rubyforge.org/mailman/listinfo/wxruby-users > >> > >> > >> > >> > > > > _______________________________________________ > > wxruby-users mailing list > > wxruby-users@rubyforge.org > > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > >--
alex fenton wrote:> Hi Zach > > It seems to work as I''d expect - if I click Cancel, the application > exits, if I click OK it runs that bit of code and closes the dialog, > and if I close the dialog using the button on the top-right, it just > closes and the application carries on. Perhaps your Game code is > exiting? What are you seeing that you don''t expect?As soon as I don''t call end_modal, the application never quits So the Game code I dont'' think is exiting.> > By the way, WxRuby has classes to make standard dialogs like OK/Cancel > and Yes/No/Cancel very easy to use, so you don''t need to construct and > place your own buttons and hook up your own events. You might be > interested in: > > http://wxruby.rubyforge.org/wiki/wiki.pl?Using_Dialogs_To_Talk_To_UsersThanks for the link, but I"ve already been through it. My dialog is custom because I need to ask the User a question, I didn''t see a InputDialog that would do that. If there is one let me know!> cheers > alexThanks for your response. I will post my game code in another post. Zach
Zach Dennis wrote:> As soon as I don''t call end_modal, the application never quits So the > Game code I dont'' think is exiting.Looking at the code you posted in f-up to Nick, I can''t see where your app enters the main_loop. Try calling the main_loop method on your instance of Wx::App to make the application stay and wait for events from the user rather than exiting as a normal ruby script would.>> http://wxruby.rubyforge.org/wiki/wiki.pl?Using_Dialogs_To_Talk_To_Users > > > Thanks for the link, but I"ve already been through it. My dialog is > custom because I need to ask the User a question, I didn''t see a > InputDialog that would do that. If there is one let me know!Wx::TextEntryDialog cheers alex
alex fenton wrote:> Zach Dennis wrote: > >> As soon as I don''t call end_modal, the application never quits So the >> Game code I dont'' think is exiting. > > > Looking at the code you posted in f-up to Nick, I can''t see where your > app enters the main_loop. Try calling the main_loop method on your > instance of Wx::App to make the application stay and wait for events > from the user rather than exiting as a normal ruby script would. >I can'' t beleive I missed that! Thanks so much!>>> http://wxruby.rubyforge.org/wiki/wiki.pl?Using_Dialogs_To_Talk_To_Users >> >> >> >> Thanks for the link, but I"ve already been through it. My dialog is >> custom because I need to ask the User a question, I didn''t see a >> InputDialog that would do that. If there is one let me know! > > > Wx::TextEntryDialog >Thanks again!> cheers > alex >Zach