Re: automatic dll wrapping

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

This is a multi-part message in MIME format.

------=_NextPart_000_0055_01C0C596.29A32D60
	charset="iso-8859-2"

Hi,

Yes this has been attempted before.

Look in the archives for SWIG/Euphoria by the great David Cuny!!!
SWIG is an Open Source project that is used to wrap DLL's for
a number of scripting languages (Perl and Python being the Primary =
ones??).

SWIG/Euphoria is/was David Cuny's attempt for a Euphoria version. =20
I can't remember how good it was ... it worked at some level for sure.
It would be a good starting point though and I'm sure full of =
information
for anyone attempting similar things.

I also attempted my own version when I was wrapping Allegro without =
sucess.

If you know pascal the FreePascal people have a H2PAS program which
converts C header files to pascal.  Again this has limiations but might
prove to have useful code or ideas.=20

Once you can parse a C Header file I believe the code generation =
wouldn't
be to difficult.

Ray Smith.

  ----- Original Message -----=20
  From: Tone Skoda=20
  To: EUforum=20
  Sent: Monday, April 16, 2001 5:26 AM
  Subject: automatic dll wrapping



=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Maximize your email efficiency with My Topica. Searchable
archives, vacation options, and more. Sign up now at
  I was thinking that it could be possible to make a program which would =
automatically wrap a dll. It would have .dll and .h file for input, or =
maybe just .h file, and output would be one big .ew file. It =
could/should also handle strings and structures. My WinMania library =
could be automatically generated without any work (hand editing) with =
such program. This is definiteley something that will/should probalby be =
done sometimes for Eu. euAllegro library could also be generated with =
such program. It would be like C to Eu translator, but only for =
functions in dlls. This would be a challenging task for someone to do. =
It would basically be a parser (very powerful, like a C compiler almost) =
for .h files. Then it would be using C libraries in Euphoria very easy, =
you would just generate appropriate .ew file for a dll and you could use =
it like in C but with Euphoria language. Anybody knows of any limits why =
this couldn't be done, anybody thought of this before?
=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


------=_NextPart_000_0055_01C0C596.29A32D60
Content-Type: text/html;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-2" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Yes this has been attempted =
before.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Look in the archives for SWIG/Euphoria =
by the great=20
David Cuny!!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>SWIG is an Open Source project that is =
used to wrap=20
DLL's for</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>a number of scripting languages (Perl =
and Python=20
being the Primary ones??).</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>SWIG/Euphoria is/was David Cuny's =
attempt for a=20
Euphoria version.&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I can't remember how good it was ... it =
worked at=20
some level for sure.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It would be a good starting point =
though and I'm=20
sure full of information</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>for anyone attempting similar =
things.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I also attempted my own version when I =
was wrapping=20
</FONT><FONT face=3DArial size=3D2>Allegro without sucess.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>If you know pascal the FreePascal =
people have a=20
H2PAS program which</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>converts C header files to =
pascal.&nbsp; Again this=20
has limiations but might</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>prove to have useful code or ideas. =
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Once you can parse a C Header file I =
believe the=20
code generation wouldn't</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>be to difficult.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Ray Smith.</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:tone.skoda at siol.net" =
title=3Dtone.skoda at siol.net>Tone Skoda</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
href=3D"mailto:EUforum at topica.com"=20
  title=3DEUforum at topica.com>EUforum</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, April 16, 2001 =
5:26=20
AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> automatic dll =
wrapping</DIV>
</PRE><PRE>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Maximize your email efficiency with My Topica. Searchable
archives, vacation options, and more. Sign up now at
<A =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</PRE>
  <DIV><FONT face=3DArial size=3D2>I was thinking that it could be =
possible to make=20
  a program which would automatically wrap a dll. It would have .dll and =
.h file=20
  for input, or maybe just .h file, and output would be one big .ew =
file. It=20
  could/should also handle&nbsp;strings and structures. My WinMania =
library=20
  could be automatically generated without any work (hand editing)=20
  with&nbsp;such program. This is definiteley something =
that&nbsp;will/should=20
  probalby&nbsp;be done sometimes for Eu. euAllegro library could also=20
  be&nbsp;generated with&nbsp;such program.&nbsp;It would be like C to =
Eu=20
  translator, but only for functions in dlls. This would be a =
challenging task=20
  for someone to do. It would basically be a parser (very powerful, like =
a C=20
  compiler almost) for .h files.</FONT><FONT face=3DArial size=3D2> Then =
it would be=20
  using C libraries in Euphoria very easy, you would just&nbsp;generate=20
  appropriate .ew file for a dll and you could use it like in C but with =

  Euphoria language. Anybody knows of any limits why this couldn't be =
done,=20
  anybody thought of this =
before?</FONT></DIV><PRE>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=


<A =
=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

------=_NextPart_000_0055_01C0C596.29A32D60--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu