This one includes the latest App.cpp which includes the Mac fix from Nick. I thought it was in 0.0.11, but it wasn''t. It also adds support for "stock objects", like colours, pens, and fonts. This turned out to be quite challenging, but I''m happy with the solution. It only took a few days :-/ Kevin
On 2004 Apr 29, at 1:52, Kevin Smith wrote:> This one includes the latest App.cpp which includes the Mac fix from > Nick. I thought it was in 0.0.11, but it wasn''t. > > It also adds support for "stock objects", like colours, pens, and > fonts. This turned out to be quite challenging, but I''m happy with the > solution. It only took a few days :-/Looks like the new color support broke the build on Mac: g++ -dynamic -bundle -undefined suppress -flat_namespace -framework Carbon obj/App.o obj/Bitmap.o obj/BitmapButton.o obj/BoxSizer.o obj/Brush.o obj/Button.o obj/CalendarCtrl.o obj/CalendarDateAttr.o obj/CalendarEvent.o obj/Caret.o obj/CheckBox.o obj/Choice.o obj/CloseEvent.o obj/CommandEvent.o obj/Control.o obj/ControlWithItems.o obj/DC.o obj/Dialog.o obj/Event.o obj/EvtHandler.o obj/Frame.o obj/GDIObject.o obj/Icon.o obj/Menu.o obj/MenuBar.o obj/Object.o obj/PaintDC.o obj/PaintEvent.o obj/Panel.o obj/Point.o obj/Size.o obj/Sizer.o obj/StaticText.o obj/UpdateUIEvent.o obj/Window.o obj/WindowDC.o obj/wx.o obj/RubyConstants.o obj/RubyStockObjects.o obj/Functions.o -L/usr/local/lib -framework Carbon -framework System -lwx_mac-2.4 -ldl -lobjc -o lib/wx.bundle ld: multiple definitions of symbol _wxRED obj/wx.o definition of _wxRED in section (__DATA,__common) /usr/local/lib/libwx_mac-2.4.dylib(master.20828.o) definition of _wxRED rake aborted! -- Ryan "John" Platte Custom services, NIKA Consulting http://nikaconsulting.com/
On 2004 Apr 29, at 9:00, John Platte wrote:> On 2004 Apr 29, at 1:52, Kevin Smith wrote: > >> This one includes the latest App.cpp which includes the Mac fix from >> Nick. I thought it was in 0.0.11, but it wasn''t. >> >> It also adds support for "stock objects", like colours, pens, and >> fonts. This turned out to be quite challenging, but I''m happy with >> the solution. It only took a few days :-/ > > Looks like the new color support broke the build on Mac: > ...Success! I grabbed the App.cpp from .12 and edited out references to StockObjects and got a build of 0.0.11! As before, we run without a menu bar from the command line, but I hacked together a quick .app bundle (I can provide a list of the needed tasks if desired) and got a successful minimal application with menu bar, about box, etc. Haven''t tried other samples yet. -- Ryan "John" Platte Custom services, NIKA Consulting http://nikaconsulting.com/
On 2004 Apr 29, at 9:17, John Platte wrote:> Success! > > I grabbed the App.cpp from .12 and edited out references to > StockObjects and got a build of 0.0.11! As before, we run without a > menu bar from the command line, but I hacked together a quick .app > bundle (I can provide a list of the needed tasks if desired) and got a > successful minimal application with menu bar, about box, etc. Haven''t > tried other samples yet.Sorry to reply to myself yet again -- I got the segfault behavior at quit time as well, both invoking from the command line and opening the .app bundle. -- Ryan "John" Platte Custom services, NIKA Consulting http://nikaconsulting.com/
Kevin Smith wrote:> Subject: [Wxruby-users] wxruby-swig 0.0.12 is upHere''s the (uninvestigated) results of trying to build this on Windows. Curt ======================================= E:\Dev\RubyDev\wxruby\wxruby-swig\wxruby-swig-0.0.12>ruby c:\ruby\bin\rake.rb (in E:/Dev/RubyDev/wxruby/wxruby-swig/wxruby-swig-0.0.12) cl.exe -c -IE:\Dev\RubyDev\wxruby\wx/include /D__WXMSW__ -D__WXMSW__ -IE:\Dev\Ru byDev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 -DSTRICT -DWIN32 -D__WIN32__ -D_ WINDOWS /D__WINDOWS__ -DWINVER=0x0400 /D__WIN95__ -D_DEBUG -D__WXDEBUG__ -DWXDEB UG=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/App.obj src/App.cpp Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved. App.cpp E:\Dev\RubyDev\wxruby\wx\include\wx\intl.h(37) : warning C4005: ''_'' : macro rede finition c:\ruby\lib\ruby\1.8\i386-mswin32\defines.h(26) : see previous definitio n of ''_'' E:\Dev\RubyDev\wxruby\wx\include\wx\thread.h(447) : error C2062: type ''void'' une xpected E:\Dev\RubyDev\wxruby\wx\include\wx\thread.h(447) : error C2238: unexpected toke n(s) preceding '';'' E:\Dev\RubyDev\wxruby\wx\include\wx\msw\toplevel.h(96) : error C2059: syntax err or : ''constant'' E:\DevTools\VS2003\Vc7\include\ostream(574) : warning C4530: C++ exception handl er used, but unwind semantics are not enabled. Specify /EHsc E:\DevTools\VS2003\Vc7\include\ostream(604) : fatal error C1903: unable to recov er from previous error(s); stopping compilation Exception `RuntimeError'' at c:/ruby/lib/ruby/site_ruby/1.8/rake.rb:358 - Command Failed: [cl.exe -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__W IN32__ -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:/rub y/lib/ruby/1.8/i386-mswin32 -I rake aborted! Command Failed: [cl.exe -c -IE:\Dev\RubyDev\wxruby\wx/include /D__WXMSW__ -D__WX MSW__ -IE:\Dev\RubyDev\wxruby\wx/lib/mswd /MDd -Zi -O2b2xg- -G6 -DSTRICT -DWIN3 2 -D__WIN32__ -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/si te_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/App.obj src/App.cpp ] E:\Dev\RubyDev\wxruby\wxruby-swig\wxruby-swig-0.0.12>
Kevin Smith
2004-Apr-29 12:41 UTC
[Wxruby-users] wxruby-swig 0.0.12 on Mac (was: wxruby-swig 0.0.12 is up)
John Platte wrote:>> I grabbed the App.cpp from .12 and edited out references to >> StockObjects and got a build of 0.0.11! As before, we run without a >> menu bar from the command line, but I hacked together a quick .app >> bundle (I can provide a list of the needed tasks if desired) and got a >> successful minimal application with menu bar, about box, etc. Haven''t >> tried other samples yet.I''m glad you mostly got it working on the Mac. I am interested in seeing the steps to create an app bundle. The wxRED error you mentioned in the other email made no sense at all. I re-checked, and there is only a single reference to wxRED in all of wxruby-swig...and it is just a read of the variable not a declaration. Something very strange is going on. I wish the error message said which modules defined wxRED. Perhaps you could try adding one or more of these flags to $extra_ldflags in rakemacosx.rb, to see if we can get more info about the wxRED problem: -Xlinker --print-map -Xlinker --trace -Xlinker --cref Alternatively, it looks like we might be able to work around it with: -Xlinker --allow-multiple-definition In each case, -Xlinker tells g++ to forward the following option to ld. Unfortunately, g++ will silently ignore any options it doesn''t recognize, so if you forget -Xlinker, or misspell anything, it won''t tell you there is a problem.> I got the segfault behavior at quit time as well, both invoking from the > command line and opening the .app bundle.Ok. It is unanimous. I will try harder to figure out what is causing this. Thank again, Kevin
Kevin Smith
2004-Apr-29 12:54 UTC
[Wxruby-users] wxruby-swig on MSWin (was: wxruby-swig 0.0.12 is up)
Curt Hibbs wrote:> Kevin Smith wrote: > >>Subject: [Wxruby-users] wxruby-swig 0.0.12 is up > Here''s the (uninvestigated) results of trying to build this on Windows.At a glance, this looks identical to the earlier results. Are you using the same wx headers that you use to build wxRuby 0.3? The first error seems to be a conflict between wx and ruby both defining the _ macro. It looks like to get around this, you''ll need to build wxWindows without wxUSE_INTL defined. I don''t know why this would be different now. The error in thread.h at line 447 doesn''t make sense to me. My version of thread.h doesn''t have any code there at all, so I can''t see what it might be. I don''t have the msw include directory here, so I also can''t see the code in toplevel.h. The ostream error also looks weird, since wx doesn''t use exceptions. We could try working around this by following the compiler''s advice and using /EHsc as a compiler flag. Thanks, Kevin> =======================================> > E:\Dev\RubyDev\wxruby\wxruby-swig\wxruby-swig-0.0.12>ruby > c:\ruby\bin\rake.rb > (in E:/Dev/RubyDev/wxruby/wxruby-swig/wxruby-swig-0.0.12) > cl.exe -c -IE:\Dev\RubyDev\wxruby\wx/include > /D__WXMSW__ -D__WXMSW__ -IE:\Dev\Ru > byDev\wxruby\wx/lib/mswd > /MDd -Zi -O2b2xg- -G6 -DSTRICT -DWIN32 -D__WIN32__ -D_ > WINDOWS /D__WINDOWS__ -DWINVER=0x0400 > /D__WIN95__ -D_DEBUG -D__WXDEBUG__ -DWXDEB > UG=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/App.obj src/App.cpp > Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86 > Copyright (C) Microsoft Corporation 1984-2002. All rights reserved. > > App.cpp > E:\Dev\RubyDev\wxruby\wx\include\wx\intl.h(37) : warning C4005: ''_'' : macro > rede > finition > c:\ruby\lib\ruby\1.8\i386-mswin32\defines.h(26) : see previous > definitio > n of ''_'' > E:\Dev\RubyDev\wxruby\wx\include\wx\thread.h(447) : error C2062: type ''void'' > une > xpected > E:\Dev\RubyDev\wxruby\wx\include\wx\thread.h(447) : error C2238: unexpected > toke > n(s) preceding '';'' > E:\Dev\RubyDev\wxruby\wx\include\wx\msw\toplevel.h(96) : error C2059: syntax > err > or : ''constant'' > E:\DevTools\VS2003\Vc7\include\ostream(574) : warning C4530: C++ exception > handl > er used, but unwind semantics are not enabled. Specify /EHsc > E:\DevTools\VS2003\Vc7\include\ostream(604) : fatal error C1903: unable to > recov > er from previous error(s); stopping compilation
Curt Hibbs
2004-Apr-29 13:05 UTC
[Wxruby-users] wxruby-swig on MSWin (was: wxruby-swig 0.0.12 is up)
Kevin Smith wrote:> > Curt Hibbs wrote: > > Kevin Smith wrote: > > > >>Subject: [Wxruby-users] wxruby-swig 0.0.12 is up > > Here''s the (uninvestigated) results of trying to build this on Windows. > > At a glance, this looks identical to the earlier results. > > Are you using the same wx headers that you use to build wxRuby 0.3? > > The first error seems to be a conflict between wx and ruby both defining > the _ macro. It looks like to get around this, you''ll need to build > wxWindows without wxUSE_INTL defined. I don''t know why this would be > different now.I think I need to recompile wxWindows. I used VC++ 6.0 for wxRuby 0.3 and wxWindows, but I am now using VC++ 7.1 (from Visual Studio 2003 .NET) for wx-ruby-swig. So perhaps these are spurious errors from some incompatibility. I will rebuild wxWindows before trying again. Curt
Kevin, Are you still using wxWidgets 2.4.1 for wxruby-swig, or have you moved to 2.4.2? Curt
Curt Hibbs wrote:> Are you still using wxWidgets 2.4.1 for wxruby-swig, or have you moved to > 2.4.2?My old machine has 2.4.1, and that''s what I still do all my wxRuby development on. My new machine has 2.4.2, and it is my wxruby-swig development machine. I have compiled wxRuby 0.3 on my new machine, and have not seen any problems. But I haven''t done much with it besides running various samples. Kevin
Kevin Smith wrote:> > Curt Hibbs wrote: > > Are you still using wxWidgets 2.4.1 for wxruby-swig, or have > you moved to > > 2.4.2? > > My old machine has 2.4.1, and that''s what I still do all my wxRuby > development on. > > My new machine has 2.4.2, and it is my wxruby-swig development machine. > I have compiled wxRuby 0.3 on my new machine, and have not seen any > problems. But I haven''t done much with it besides running various samples.Ok then, since I''m going to rebuild wxWidgets anyway, I''m going to move to 2.4.2. Curt