Re: Unified libraries to allow porting code to other oses

new topic     » goto parent     » topic index » view thread      » older message » newer message
jmduro said...

Porting source code to other OSes can be very painfull. With one library, a unique call to a function with multiple parameters does the job, and on another you have to call multiple atomic functions to get the same result.

GUIs like wxWidgets have several function names to change a value according to classes where win32lib uses the same function name. Porting can be a hunter game where you need to spend weeks reading the documentation for each GUI you are testing.

What does the latter have to do with the former? wxWidgets might use different names for different classes, but the same naming scheme would apply across all wxWidget supports platforms.

jmduro said...

The aim is to ease the step of porting Euphoria code from windows to multiplatform to linux and reverse. It is based on the following principle:

           \ OS        Windows        Multiplatform       Linux  
Skill level \       
Beginner               winSimple  <-->  wxSimple    <-->  linSimple  
                          ^                ^                 ^  

winSimple would be as simple as:

ifdef WIN32LIB then  
  include winlibSimple.e  
elsifdef ARWEN then  
  include arwenSimple.e  
elsifdef TIN_EWG then  
  include tinEwgSimple.e  
end ifdef  

So everyone who wants to port his code to another OS can do it at his skill level. As an example, if I know only win32lib, I will be able to port my program to use winlibSimple instead of win32lib.

This was the original intent of the original author of win32lib, dcuny. In addition to there was also a dos32lib and the idea was that one could switch between the two simply by changing "include win32lib.ew" to "include dos32lib.e" - and there was also a linux version, see and

Then the original author moved on to other things, win32lib was taken over by a group that no longer cared about cross platform compatibility, and lack of interest killed off the dos32lib and gtklib versions.

Maintaining a cross platform UI toolkit/library is hard work. Even something like winSimple (which imvho is very badly named, as it sounds windoze-centric) would be a lot of effort.

jmduro said...

You still have access to wxEuphoria standard functions. Simple functions are designed for people who migrate from one OS to another, from one GUI to another, with few knowledge of the intended target. Advanced users can use standard functions.



Wouldn't this break the desired goal, cross compatibility? Any program that uses the standard wxEuphoria functions would not be able to change the library from wxSimple to winlibSimple.e without having someone manually addressing issue of the advanced calls.

new topic     » goto parent     » topic index » view thread      » older message » newer message


Quick Links

User menu

Not signed in.

Misc Menu