The result of the compilation after installing swig results in lots of errors of the sort: WindowDisabler.obj : error LNK2001: unresolved external symbol _SWIG_Ruby_ConvertPtr I can see this is defined in rubydef.swg but I''m not sure why this isn''t just included in the files that need it. Can any swig experts tell me what I need to do to progress? I''m using Swigwin 1.3.25, btw.
Roy Sutton wrote:> The result of the compilation after installing swig results in lots of > errors of the sort: > > WindowDisabler.obj : error LNK2001: unresolved external symbol > _SWIG_Ruby_ConvertPtr > > I can see this is defined in rubydef.swg but I''m not sure why this isn''t > just included in the files that need it. Can any swig experts tell me > what I need to do to progress? I''m using Swigwin 1.3.25, btw.Hm. Are you using Ruby 1.6? I can''t think of anything else off-hand, but if you tell me you''re using Ruby 1.8 I can research it further. Kevin
I was a baaaaad boy. I just overlaid my last tarball with the most recent one. I really /should/ know better. I completely wiped my wxruby2 directory, but saved my modified rakemswin. It still doesn''t work and still callls swig during compilation. It swigs the following file now: swig -runtime -w401 -w801 -w515 -c++ -ruby -o src/wx.cpp swig/wx.i SWIG(1): Warning(120): -c, -runtime, -noruntime command line options are deprecated. ruby swig/renamer.rb src/wx.cpp ruby swig/fixmainmodule.rb src/wx.cpp The link still fails at the end with all the _SWIG_Ruby_* undefined external symbols. This is with Ruby 1.8. I won''t have any time tonight to look over this and my time is somewhat limited the early part of the week. Roy Kevin Smith wrote:> Roy Sutton wrote: > >> The result of the compilation after installing swig results in lots >> of errors of the sort: >> >> WindowDisabler.obj : error LNK2001: unresolved external symbol >> _SWIG_Ruby_ConvertPtr >> >> I can see this is defined in rubydef.swg but I''m not sure why this >> isn''t just included in the files that need it. Can any swig experts >> tell me what I need to do to progress? I''m using Swigwin 1.3.25, btw. > > > Hm. Are you using Ruby 1.6? I can''t think of anything else off-hand, > but if you tell me you''re using Ruby 1.8 I can research it further. > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >
Roy Sutton wrote:> I was a baaaaad boy. I just overlaid my last tarball with the most > recent one. I really /should/ know better. I completely wiped my > wxruby2 directory, but saved my modified rakemswin. It still doesn''t > work and still callls swig during compilation. It swigs the following > file now: > > swig -runtime -w401 -w801 -w515 -c++ -ruby -o src/wx.cpp swig/wx.i > SWIG(1): Warning(120): -c, -runtime, -noruntime command line options are > deprecated. > ruby swig/renamer.rb src/wx.cpp > ruby swig/fixmainmodule.rb src/wx.cppHm. Perhaps wx.i changed, but wx.h/cpp didn''t, so my CVS didn''t update the src/ files, but rake on your system doesn''t realize they haven''t changed. Ugh. Maybe I need to somehow tell CVS to check src/ in if any files have been touched, even if they haven''t changed. I wonder if there''s a way to do that on a per-directory basis.> The link still fails at the end with all the _SWIG_Ruby_* undefined > external symbols. This is with Ruby 1.8. I won''t have any time tonight > to look over this and my time is somewhat limited the early part of the > week.That really sounds like it''s not linking in swig itself. Can we see the link command that''s being executed? Kevin
Kevin, Here''s the link command: link /DEBUG /PDB:C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/vc60.pdb swig/wx.res obj/App.obj obj/ArtProvider.obj obj/Bitmap.obj obj/BitmapButton.obj obj/BoxSizer.obj obj/Brush.obj obj/BusyCursor.obj obj/BusyInfo.obj obj/Button.obj obj/CalendarCtrl.obj obj/CalendarDateAttr.obj obj/CalendarEvent.obj obj/Caret.obj obj/CheckBox.obj obj/CheckListBox.obj obj/Choice.obj obj/ClassInfo.obj obj/ClientDC.obj obj/CloseEvent.obj obj/Colour.obj obj/ColourData.obj obj/ColourDialog.obj obj/ComboBox.obj obj/CommandEvent.obj obj/Control.obj obj/ControlWithItems.obj obj/Cursor.obj obj/DC.obj obj/Dialog.obj obj/DirDialog.obj obj/Event.obj obj/EvtHandler.obj obj/FileDialog.obj obj/FindDialogEvent.obj obj/FindReplaceData.obj obj/FindReplaceDialog.obj obj/FlexGridSizer.obj obj/FocusEvent.obj obj/Font.obj obj/FontData.obj obj/FontDialog.obj obj/Frame.obj obj/GDIObject.obj obj/Gauge.obj obj/Grid.obj obj/GridCellBoolEditor.obj obj/GridCellChoiceEditor.obj obj/GridCellEditor.obj obj/GridCellFloatEditor.obj obj/GridCellNumberEditor.obj obj/GridCellTextEditor.obj obj/GridEvent.obj obj/GridRangeSelectEvent.obj obj/GridSizeEvent.obj obj/GridSizer.obj obj/Icon.obj obj/IdleEvent.obj obj/Image.obj obj/ImageList.obj obj/IndividualLayoutConstraint.obj obj/KeyEvent.obj obj/LayoutConstraints.obj obj/ListBox.obj obj/ListCtrl.obj obj/Log.obj obj/LogTextCtrl.obj obj/MDIChildFrame.obj obj/MDIParentFrame.obj obj/Mask.obj obj/MemoryDC.obj obj/Menu.obj obj/MenuBar.obj obj/MenuItem.obj obj/MessageDialog.obj obj/MouseEvent.obj obj/MoveEvent.obj obj/Notebook.obj obj/NotebookEvent.obj obj/NotifyEvent.obj obj/Object.obj obj/PaintDC.obj obj/PaintEvent.obj obj/Panel.obj obj/Pen.obj obj/Point.obj obj/ProgressDialog.obj obj/RadioBox.obj obj/RadioButton.obj obj/ScrolledWindow.obj obj/SingleChoiceDialog.obj obj/Size.obj obj/SizeEvent.obj obj/Sizer.obj obj/Slider.obj obj/SpinButton.obj obj/SpinCtrl.obj obj/SpinEvent.obj obj/SplitterEvent.obj obj/StaticBitmap.obj obj/StaticBox.obj obj/StaticBoxSizer.obj obj/StaticLine.obj obj/StaticText.obj obj/StatusBar.obj obj/TextCtrl.obj obj/TextEntryDialog.obj obj/TipProvider.obj obj/TipWindow.obj obj/ToggleButton.obj obj/ToolBar.obj obj/ToolTip.obj obj/TreeEvent.obj obj/UpdateUIEvent.obj obj/Window.obj obj/WindowDC.obj obj/WindowDisabler.obj obj/wx.obj obj/RubyConstants.obj obj/RubyStockObjects.obj obj/RubyEventTypes.obj obj/Functions.obj obj/Mac.obj obj/Events.obj obj/Xrc.obj C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/wxpngd.lib C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/wxzlibd.lib C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/wxjpegd.lib C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/wxtiffd.lib C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/wxbase26d.lib C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/wxmsw26d_adv.lib C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/wxmsw26d_xrc.lib C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/wxbase26d_xml.lib C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/wxexpatd.lib C:\RubyDev\wxWidgets-2.6.1/lib/vc_lib/wxmsw26d_core.lib oldnames.lib user32.lib advapi32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib winmm.lib c:/ruby/lib/msvcrt-ruby18.lib /dll /out:lib/wxruby2.so Exception `RuntimeError'' at c:/ruby/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake.rb:485 - Command failed with status (96): [link /DEBUG /PDB:C:\RubyDev\wxWidgets-2.6...] I should try compiling some of the example swig code to see how it all works I suppose. The odd thing is that this wasn''t an issue until the latest tarball, so something in the latest files has changed this swig dynamic. Kevin Smith wrote:> Roy Sutton wrote: > >> I was a baaaaad boy. I just overlaid my last tarball with the most >> recent one. I really /should/ know better. I completely wiped my >> wxruby2 directory, but saved my modified rakemswin. It still doesn''t >> work and still callls swig during compilation. It swigs the >> following file now: >> >> swig -runtime -w401 -w801 -w515 -c++ -ruby -o src/wx.cpp swig/wx.i >> SWIG(1): Warning(120): -c, -runtime, -noruntime command line options >> are deprecated. >> ruby swig/renamer.rb src/wx.cpp >> ruby swig/fixmainmodule.rb src/wx.cpp > > > Hm. Perhaps wx.i changed, but wx.h/cpp didn''t, so my CVS didn''t update > the src/ files, but rake on your system doesn''t realize they haven''t > changed. Ugh. Maybe I need to somehow tell CVS to check src/ in if any > files have been touched, even if they haven''t changed. I wonder if > there''s a way to do that on a per-directory basis. > >> The link still fails at the end with all the _SWIG_Ruby_* undefined >> external symbols. This is with Ruby 1.8. I won''t have any time >> tonight to look over this and my time is somewhat limited the early >> part of the week. > > > That really sounds like it''s not linking in swig itself. Can we see > the link command that''s being executed? > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >
OK, my problems are entirely related to swigging wx.i. When I swig it, I don''t get the #define SWIG_GLOBAL 1 line and all the defs for the missing externals. If I unpack the .cpp and .h files and touch them I can get the library to compile. I''ll do some more work with it this week. Roy Kevin Smith wrote:> Roy Sutton wrote: > >> I was a baaaaad boy. I just overlaid my last tarball with the most >> recent one. I really /should/ know better. I completely wiped my >> wxruby2 directory, but saved my modified rakemswin. It still doesn''t >> work and still callls swig during compilation. It swigs the >> following file now: >> >> swig -runtime -w401 -w801 -w515 -c++ -ruby -o src/wx.cpp swig/wx.i >> SWIG(1): Warning(120): -c, -runtime, -noruntime command line options >> are deprecated. >> ruby swig/renamer.rb src/wx.cpp >> ruby swig/fixmainmodule.rb src/wx.cpp > > > Hm. Perhaps wx.i changed, but wx.h/cpp didn''t, so my CVS didn''t update > the src/ files, but rake on your system doesn''t realize they haven''t > changed. Ugh. Maybe I need to somehow tell CVS to check src/ in if any > files have been touched, even if they haven''t changed. I wonder if > there''s a way to do that on a per-directory basis. > >> The link still fails at the end with all the _SWIG_Ruby_* undefined >> external symbols. This is with Ruby 1.8. I won''t have any time >> tonight to look over this and my time is somewhat limited the early >> part of the week. > > > That really sounds like it''s not linking in swig itself. Can we see > the link command that''s being executed? > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >