Re: wxEuphoria machine level exception
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Nov 24, 2004
- 598 views
Chris Burch wrote: > > Hi > > I have just tested the wxEuphoria installation on linux. > > I too get the machine level exception on line 56 <snip> > > 1st - couldn't open libwx_gtk-2.4.so.0.1.1 (aborted)- the lib is in the bin > directory, > and the paths are set correctly (echo $EUDIR) > > 2nd - moved that copy of libwx_gtk-2.4.so.0.1.1 to /usr/lib and ran ldconfig, > modified wxEuphoria to specify the lib with no path - same result. > > 3rd - downloaded wxgtk 2.4.2 rpm from www.wxwidgets.org, and installed that, > again keeping the no path specified. Different result. The lib is opened, but > there is no WX_DLL_BUILD in that library (there is in the original one, > both checked with an nm dump) > > So far its a good lib for windows, but can't get it to run on Linux. Any other > ideas. Ok, sounds like the file got corrupted. I don't think I'll be able to fix it tonight, but hopefully by tomorrow night I'll have a fix uploaded to sourceforge. Will advise... > Couple of extra points. Your libraries (so far only wxEuphoria) are platform > specific - can you make them non-specific - ie the eu includes will run on > Linux or windows unmodified, just detecting to os internally, and loading > the appropriate libs. I'd rather not do this. The bulk of many of the files are the imports, which are different for each platform. Even the constant names are different in some cases. This also causes problems in the code. Added to that, there are places in the declarations that actually call wxWidgets functions. This would be hard to fix. And how to handle duplicate names, which require different imports? And then, with 2.5, it's just that much more that would need to be parsed. I think the solution I have is a pretty good one. It works a lot like ifdef's in C/C++ do. If you download the developer package, you'll find a perl program that converts back and forth between the two platforms. You'll also find the databases that hold all of the import information, and a program called generate.exw, which will rewrite all of the constant declarations automatically. It's a fairly painless process, and one that I think few people will really need. The important thing, IMHO, is that apps can be easily moved between Windows and Linux. If you get the wxWidgets 2.4.2 source, and patch it with the linux source contained in the developers package, you can build the library yourself, but it takes a while. I think it takes an hour or two (been a while since I've done a build from scratch) on my 600Mhz machine (RH8). I've made lots of modifications, so you can't use wxWidgets without my patches. > Currently, wxEuphoria looks for libwx_gtk-2.4.so.0.1.1 in a very specific > place. If you package an app, and give it to someone else, including the > library, then the program won't work, as you don't have the same directory > structure. Perhaps it could be made to be less choosy in its location > (~/ or ./) ? I guess I should have documented this a bit more. It's fairly easy to change where it looks, by modifying the wxWin_Name constant. The Euphoria bin directory seemed like the most logical place for it, and I was also sorta copying how Irv did it in EuGTK, using something that worked as an example. I'm not completely clear how linking to libraries works in Linux. Matt Lewis