Re: Announce: Euphoria To C Translator
- Posted by Mike The Spike <mikethespike at FREEZE.COM> Sep 08, 2000
- 493 views
On Thu, 7 Sep 2000 22:43:09 -0400 Robert Craig <rds at ATTCANADA.NET> wrote: >Bernie Ryan writes: >> Looking at the "C" code generated by the compiler/translator >> it looks like the biggest stumbling block for moving the code >> to a "C" compiler that most people have, is the calls to the >> built-in machine functions which are based on Watcom code. > >I don't know which routines you are referring to. >Most of the routine names that you see in the code >are my routines. They are not Watcom-specific routines. > >> I'am afraid that it is a serious mistake to rely on built-in >> functions in a dead compiler ( Watcom ). > >I don't forsee many enhancements to DOS in the near future, >so WATCOM for DOS32 should be fine. As for it >being "dead", tell that to the folks who are starting up >a major open source project for Watcom. > >I hope to get around to Borland and DJGPP someday. >I hope Watcom will be downloadable soon. If it isn't >going to happen in a reasonable time, I'll target something else. > >Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com Actually, he's right. Shipping a Watcom-specific .lib file was a big mistake. Just for testing purposes, I took a Euphoria program translated to C using ecw, and tried to compile it with VC++. 0 Errors. It compiled perfectly. However, offcourse, ecw.lib was of an unknown format, Watcom format, so it didn't link in. If you did what I did and produced ANSI-C euphoria.c and euphoria.h libraries containing the definitions of internal functions (Machine functions), then users could compile the Win32 source produced with any Win32 compiler they wanted, the DOS32 source with any DOS32 compiler they wanted, etc. For win32, my Euphoria.h includes windows.h, and uses only a snippet of code from it to do DLL calling. windows.h is the library any Win32 C compiler has. For DOS I just use simple yet fast ways to draw graphics and do other non-portable stuff, using ANSI-C code. So there are ways you can support dozens of compilers out there, but offcourse your vanity will kill you. (Because you'd have to let programmers see the source to Euphoria internal functions. Wich is a good thing for portability if you ask me.) Mike The Spike ********************************************* Want free email? Sign up at http://www.freeze.com !