shlomi-fish-homepage / t2 / open-source / portability-libs / index.html.wml

#include '../template.wml'
#include "toc_div.wml"

<latemp_subject "Cross-Platform Abstraction Libraries" />

<latemp_meta_desc "Cross-Platform libraries for abstracting system services and for portability." />

<latemp_more_keywords "portability,libraries,portable,cross,platform,abstraction,library,qt,wx,gtk,glib,c,c++,stl,porting,unix,windows,linux,apple,mac os" />

<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 <a href="http://www.perl.org/">Perl</a>,
<a href="http://www.python.org/">Python</a> or
<a href="http://www.ruby-lang.org/en/">Ruby</a> usually provide an abstraction
for such things within the language.
</p>

<define-tag licence_qt>
LGPLed starting from version 4.5. Previously licensed under either the GPL
or a commercial licence.
</define-tag>

<define-tag lib_qt_core>

<li>
<p>
<a href="http://doc.trolltech.com/4.1/qtcore.html">QtCore</a> -
part of <a href="#lib_qt">Qt</a> that provides data structures and system
services (and not GUI). <licence_qt />
</p>
</li>

</define-tag>

<toc_div />

<h2 id="data_structures">Data Structures</h2>

<ul>
<li>
<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-optimised code. LGPLed.
</p>
</li>

<li>
<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>
</li>

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

<li>
<p>
<a href="http://adtinfo.org/">The libavl Homepage</a> -
Contains links to many implementations of balanced binary trees.
</p>
</li>

<li>
<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>
</li>

<lib_qt_core />

</ul>

<h2 id="system_services">System-Services Abstractions</h2>

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

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

<li>
<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>
</li>

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

<li>
<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>
</li>

<li>
<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>
</li>

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

<li>
<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>
</li>

<li>
<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>
</li>

<li>
<p>
<a href="http://appinf.com/poco/info/index.html">C++ Portable Components</a> -
cover functionality like threads, thread synchronisation, filesystem access,
streams, shared libraries and class loading, sockets and network protocols
(HTTP, FTP, SMTP, etc.), including an HTTP server, as well as an XML parser
with SAX2 and DOM interfaces.
</p>
</li>

<li>
<p>
<a href="http://threadingbuildingblocks.org/">Intel Threading Building Blocks</a> -
a library for threading abstractions (open source).
</p>
</li>

<lib_qt_core />

</ul>

<h2 id="gui">Graphical User-Interface</h2>

<ul>

<li id="lib_wx">
<p>
<a href="http://www.wxwidgets.org/">wxWidgets</a> (formerly wxWindows) -
a C++ cross-platform GUI library with Win32 , X-Windows and Mac OS X
back-ends. Native look-and-feel. LGPLed.
</p>
</li>

<li id="lib_qt">
<p>
<a href="http://www.trolltech.com/">Qt</a> -  a C++ cross-platform GUI
library with Win32, X-Windows and Mac OS X backends. A very encompassing API.
<licence_qt />
</p>
</li>

<li id="lib_gtk">
<p>
<a href="http://www.gtk.org/">GTK+</a> - a multi-platform GUI toolkit
for C, with bindings to many other languages. LGPLed. May look ugly with the
default theme, but other themes are available.
</p>
</li>

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

<li id="lib_fltk">
<p>
<a href="http://www.fltk.org/">FLTK</a> - short for “Fast Light Toolkit”,
FLTK is a lightweight cross-platform GUI toolkit. LGPLed.
</p>
</li>

<li>
<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>
</li>

<li>
<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. <b>Note:</b> Linux version no longer
up-to-date or supported.
</p>
</li>

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

<li>
<p>
<a href="http://www.free-soft.org/guitool/">A
comprehensive list of GUI libraries for X-Windows (and perhaps
other systems)</a>
</p>
</li>
</ul>

<h2 id="multimedia">Multimedia</h2>

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

<li>
<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>
</li>

<li>
<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>
</li>

<li>
<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>
</li>

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

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

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

<h2 id="database">Database Access</h2>

<ul>
<li>
<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>
</li>

<li>
<p>
<a href="http://www.linuxnetworks.de/doc/index.php/OpenDBX">OpenDBX</a> -
a lightweight, cross-platform, database compatibility layer for C and
C++.
</p>
</li>

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

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

<h2 id="links">Links</h2>

<ul>

<li>
<p>
<a href="https://en.wikipedia.org/wiki/Cross-platform">The English
Wikipedia’s “Cross-platform” article</a> - contains a list of libraries,
platforms and languages.
</p>
</li>

</ul>

<h2 id="licence">Licence</h2>

<cc_by_british_blurb year="2011" />

<!--

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

GUI:
====

Databases:
==========

* libdbi - DBI for C - http://libdbi.sourceforge.net/
    - not native Win32 for the time being

-->

<define-tag camila_ron>
;;; Sponsored by Camila Ron
;;; Remove at 2013-09-22

<hr />

#include "camila_ron.wml"

</define-tag>

<camila_ron />
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.