Source

shlomi-fish-homepage / vipe / abstraction / index.html.wml

Full commit
#include '../template.wml'
<latemp_subject "Cross-Platform Abstraction Libraries" />

<p>
Programming an application that can run both on UNIX and on Windows 32-bit
(and optionally other platforms) can be very hard because of the fact that 
the APIs of those platforms are substantially different. Luckily, 
there are abstraction libraries with which a programmer can maintain a 
very similar code, while focusing on writing the application itself.
</p>

<p>
I will focus here on such libraries for C and C++. Higher level languages
such as Perl, Python or Ruby usually provide an abstraction for such things
within the language.
</p>

<h2>Data Structures</h2>

<p>
<a href="http://www.gtk.org/">GLib</a> - an ANSI C library that provides
many useful classes. It is complete, but sometimes common useful programming
practices (such as supplying a callback context argument) are ignored. It
also tends to have non-optimized code. LGPLed.
</p>

<p>
<a href="http://users.footprints.net/~kaz/kazlib.html">Kazlib</a> - Provides
a Red-Black tree, a hash table and a linked list manager. An Open-Source
License.
</p>

<p>
<a href="http://www.sgi.com/tech/stl/">The C++ Standard Template Library</a>
 - Provides abstractions for many common data structures.
</p>

<p>
<a href="http://www.msu.edu/user/pfaffben/avl/">The libavl Homepage</a> -
Contains links to many implementations of balanced binary trees.
</p>

<p>
<a href="http://ftpserver.bibliotech.net/freeware/c2lib/">C2Lib</a> -
Library of Basics for C that contains a pool allocator, a Perl-like vector
, hashes, Perl-like strings, and matrix and vector functions. LGPLed.
</p>

<h2>System-Services Abstractions</h2>

<p>
<a href="http://www.gtk.org/">GLib</a>
</p>

<p>
<a href="http://apr.apache.org/">The Apache Portable Run-Time</a> - contains
portable abstractions for many things, from memory allocation to threads.
Apache Group License.
</p>

<p>
<a href="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE - The Adaptive 
Communication Environment</a> - a very comprehensive C++ library that provides 
portable abstractions for almost anything a system gives you except GUI.
Runs on UNIX, Win32 and many embedded operating-systems.
</p>

<p>
<a href="http://zthread.sourceforge.net/">ZThreads</a> - a C++ library that
abstracts UNIX and Win32 threads. LGPL.
</p>

<p>
<a href="http://sources.redhat.com/pthreads-win32/">POSIX Threads for
Win32</a> - an implementation of the POSIX threads (pthreads) API for Win32.
LGPL.
</p>

<p>
<a href="http://www.roguewave.com/products/sourcepro/core/">RogueWave's 
SourcePro Core</a> - a commercial library that supplies C++ abstractions 
for many system services.
</p>

<p>
<a href="http://www.wxwindows.org/">wxBase</a> - a subset of the wxWindows
library that can be used for multi-threading and the such. C++ and LGPLed.
</p>

<p>
<a href="http://www.mozilla.org/projects/nspr/">The Netscape Portable
Runtime (NSPR)</a> - an ANSI C library that abstracts Threads, sockets,
files, data structures and many other goodies. Licensed under a 
triple GPL, LGPL and MPL licensing.
</p>

<p>
<a href="http://www.boost.org/">Boost</a> - a free portable collection of
C++ libraries that work well with the C++ Standard Library. Contains 
abstractions for data-structures and algorithms, parsing and I/O
and sockets.
</p>

<h2>Graphical User-Interface</h2>

<p>
<a href="http://www.wxwindows.org/">wxWindows</a> - a C++ cross-platform GUI
library with Win32 and X-Windows Back-ends. LGPL.
</p>

<p>
<a href="http://www.trolltech.com/">Qt</a> -  a C++ cross-platform GUI
library with Win32 and X-Windows Back-ends. A very encompassing API. 
Dually Licensed GPL/QPL for X-Windows and there's a binary only release 
for Win32. Developing commercial applications with it will require a license
from its vendor, Troll-Tech.
</p>

<p>
<a href="http://www.xulplanet.com/">Mozilla's XUL</a> - a C++ cross-platform
GUI library for X-Windows, Win32 and MacOS based on XML. Triply Licensed
under the MPL, LGPL and GPL.
</p>

<p>
<a href="http://www.bms-austria.com/projects/paragui/">ParaGUI</a> - a 
GUI library based on the <a href="http://www.libsdl.org/">SDL</a> framework.
LGPLed.
</p>

<p>
<a href="http://www.borland.com/">Borland's VCL</a> - The GUI library behind
Delphi and C++ Builder. Proprietary License, which is free for use for
developing Open-Source Programs.
</p>

<p>
<a href="http://www.fox-toolkit.org/">The FOX Toolkit</a> - a C++ toolkit
that runs on UNIX, Windows and MacOS X. Renders its own controls, so does
not have the system-wide native look and feel, but OTOH has a consistent 
one across all platforms.
</p>

<p>
<a href="http://www.geocities.com/SiliconValley/Vista/7184/guitool.html">
A comprehensive lists of GUI libraries for X-Windows (and perhaps other
systems)
</a>
</p>

<h2>Multi-Media</h2>

<p>
<a href="http://www.libsdl.org/">SDL - The Simple DirectMedia Layer</a> -
a comprehensive library that runs on Win32, BeOS and MacOS and several 
flavours of UNIX. Has bindings to many other languages
</p>

<p>
<a href="http://www.opengl.org/">OpenGL</a> - a portable library for
3-D and 2-D graphics, that provides many graphics primitives. Has an 
open-source LGPLed implementation titled <a href="http://www.mesa3d.org/">
Mesa</a>.
</p>

<p>
<a href="http://crystal.sourceforge.net/">Crystal Space</a> - a portable 
library for managing a large number of objects in a three-dimensional world.
</p>

<p>
<a href="http://www.sgi.com/software/inventor/">Open Inventor</a> - A
library for managing objects and manipulators in 3-D Space. LGPL. Runs on
Windows, Linux and IRIX.
</p>

<p>
<a href="http://www.openal.org/home/">OpenAL</a> - a library for generating
three-dimensional sound. LGPLed.
</p>

<p>
<a href="http://plib.sourceforge.net/">PLib</a> - a suite of portable
game libraries. LGPLed.
</p>

<p>
<a href="http://www.clanlib.org/">ClanLib</a> - a portable C++ game
SDK. LGPLed.
</p>

<h2>Database Access</h2>

<p>
<a href="http://www.microsoft.com/data/odbc/default.htm">ODBC</a>, 
and <a href="http://www.unixodbc.org/">unixODBC</a> - a portable, but
rather heavyweight database abstraction layer for C.
</p>

<p>
<a href="http://directory.google.com/Top/Computers/Software/Operating_Systems/Linux/Projects/Data_Management/Databases/">
Other Databases for Linux resources</a>
</p>

<p>
<a href="http://www.gnome-db.org/">libgda</a> - a database abstraction
library from the GNOME people.
</p>


<!----

Multi-media:
------------

GUI:
----

Borlands VCL

Databases:
----------

* ODBC, unixODBC, etc.
* Gnome-DB - is it available for Windows?
* libdbi - DBI for C - http://libdbi.sourceforge.net/
    - not native Win32 for the time being

--->