SWIG/Euphoria

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

I've posted my beta 1.0 version of SWIG to the Euphoria home page. The
description is a bit cryptic, so I figured I should explain it a bit.

SWIG is a program written by people people much more clever than me. It can
be found at http://www.swig.org. SWIG makes it easy to add C/C++ library
functions into scripting languages such as Tcl/Tl, Python, Perl and Guile.
You feed it an interface file (basically, the library's header file,
slightly modified), and it generates bindings for the language of your
choice. To add the new functions to your favorite language, you just
recompile the language with the new bindings that SWIG produced.

So what does this have to do with Euphoria? Well, I've coded a module onto
SWIG to generate wrappers for Euphoria. That means  it should be fairly easy
to use your favorite C/C++ library in Euphoria.

Since we don't have the source for Euphoria, SWIG/Euphoria takes a slightly
different approach than other SWIG modules. It generates the source for a
DLL file and Euphoria wrappers. Compile the DLL, include the Euphoria
wrappers, and you've added your favorite C/C++ library to Euphoria.

Well, in theory, anyway. Some caveats:

1. This is a beta, so I haven't tested it extensively.
2. It (currently) only supports Windows.
3. You need to be know how to compile the DLL with C/C++.

What might this be useful for? Graphic and sound libraries come to mind
(GLUT/OpenGL, SciTech MGL, Allegro/Win32), as well as GUI toolkits
(GraphApp, FLTK, V, wxWindows). Personally, my goal is to add wxWindows to
Euphoria.

Feedback is welcome!

Thanks!

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu