After reswigging I get link problems: Functions.obj : error LNK2001: unresolved external symbol _mWxruby2 Mac.obj : error LNK2001: unresolved external symbol _mWxruby2 Events.obj : error LNK2001: unresolved external symbol _mWxruby2 ... Which is intriguing since it seems to be defined in wx.cpp
A little investigation shows that, contrary to previous swigging, the line: extern VALUE mWxruby2; gets included inside of an extern "C" section as opposed to where it used to get placed. I''ll investigate the old swig code to see what may have kept that sane. Roy Roy Sutton wrote:> After reswigging I get link problems: > > Functions.obj : error LNK2001: unresolved external symbol _mWxruby2 > Mac.obj : error LNK2001: unresolved external symbol _mWxruby2 > Events.obj : error LNK2001: unresolved external symbol _mWxruby2 > ... > > Which is intriguing since it seems to be defined in wx.cpp > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >
Roy Sutton wrote:> A little investigation shows that, contrary to previous swigging, the line: > > extern VALUE mWxruby2; > > gets included inside of an extern "C" section as opposed to where it > used to get placed. I''ll investigate the old swig code to see what may > have kept that sane.My error. Well, my change anyway. It works fine for me on Linux having the extern be inside a "C" block but the declaration itself be out in C++ land. Doing it the new way simplified the post-processing somewhat. I''ll see if I can find a simple way to get it back out to C++ ville, and if not I''ll just go back to the ickier way. Thanks, Kevin
What about just declaring mWxruby2 in wx.cpp as extern "C"? Doesn''t -have- to be a CPP variable, does it? Kevin Smith wrote:> Roy Sutton wrote: > >> A little investigation shows that, contrary to previous swigging, the >> line: >> >> extern VALUE mWxruby2; >> >> gets included inside of an extern "C" section as opposed to where it >> used to get placed. I''ll investigate the old swig code to see what >> may have kept that sane. > > > My error. Well, my change anyway. It works fine for me on Linux having > the extern be inside a "C" block but the declaration itself be out in > C++ land. > > Doing it the new way simplified the post-processing somewhat. I''ll see > if I can find a simple way to get it back out to C++ ville, and if not > I''ll just go back to the ickier way. > > Thanks, > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >
Roy Sutton wrote:> What about just declaring mWxruby2 in wx.cpp as extern "C"? > > Doesn''t -have- to be a CPP variable, does it?I think it probably does. I found a pretty reasonable fix though, and it''s checked in now. You''ll have to reswig everything. It does still get a seg fault when exiting an app, because I haven''t re-integrated fixdeleting.rb yet. That''s next. Kevin