The windows DLL was built using the free Borland C++ compiler v5.5. The runtime library is statically linked, so it should run fine on any system (although for Win95, you may need to update your COMCTL32.DLL to version 5). It only increased the file size by about 200K (before UPX) to link statically, whereas the runtime as a DLL is about 1MB. I altered several source and header files (see patch.zip), and used a slightly different makefile (static link, compile & link resources). UPX'd, the DLL shrinks to under 2MB (from ~ 4.3MB), which I think is pretty good, and it zips to just over 1MB.
File Formats:
Similar classes are grouped together in their own include files. Each group of classes has
one file, which can be converted from one platform to the other using tools from
the developer's download. The format of each file is as follows:
--start of file.eI use some automated tools to insert the import strings into the files, and this is the format that the tools recognize, making it easy to add or remove classes from any given set of files. The "--begin autogenerated" and "-- end autogenerated" lines should never be touched. Anything between them will be deleted the next time the file is updated.global constant
-- begin autogenerated
-- begin class wxClass
-- (lots of wxClass_MemberName = "@@&&ZAXFGF" garbage)
-- end class wxClass
-- end autogenerated
-- end of file.eu or file.ew
I've tried to use namespaces to refer to all wxEuphoria symbols between files to prevent possible namespace clashes if wxEuphoria is combined with another library. All files include at least wxEuphoria.e (as wxeu) and cplusplus.e (as cpp).
Functions that return an object by value may not work. I believe that Borland and gcc both return the value on the stack, which I can't easily handle. To get around this, I've created some new functions that work with references or pointers. The Developers download has a patch for Windows and Linux to update your source tree if you want to build the library yourself.
If you look at the *.e files, you'll see at the top where there are constants defined that hold the size of the various objects (sizeof_wx*). Some objects in wxWidgets contain that information in their wxClassInfo member. However, those objects which are not derived from wxObject don't have this. The sizes for these objects are based on my combing through source and header files, and when that didn't work, trial and error. That's why you'll see things like:
sizeof_wxGridBoolCellEditor = 36,If you're able to figure out the exact size of some of these things, please let me know. Also, if you ever experience a strange crash that is somewhat repeatable, one of these objects may be the culprit. Try commenting out the lines that lead to the creation of these objects in order to track down the offender. Then you can increase the size of the object until you don't get the crash again. Please let me know if you find something!
You can change the name or location of the wxeu library by creating a global function named "wxEu_Lib" before wxEuphoria.e is created. The function should take no parameters, and should return a sequence that contains the text that will be passed to open_dll().
Calls wxLogMessage. The first call to log_message in an application will create a file named wlog.txt. You may change this by changing the global sequence log_file.
The arguments to log_message are the same as you would use with sprintf(). It is not necessary to add a newline to the message, as wxLogMessage does this automatically.
ex: log_message( "The value is %d", 5 )