ifacethoughts

C/C++ Cross Platform Libraries

This post has already been published on code::gallery blog which now has been merged into this blog.

Developing cross-platform C/C++ code is not difficult, but definitely challenging and has to be disciplined. Usually, a separate interface is designed so that the platform-specific code is encapsulated. The challenges are presented on multiple fronts - every platform (OS and/or CPU architecture) has its own API for system operations, its own Endianness, implementation of pointers and more.

Today, developers have access to a plethora of cross-platform abstraction libraries. What this means is that the developers don’t have to worry about differences in the platforms and focus on their applications. The differences are abstracted into the libraries/toolkits/frameworks. Shlomi Fish has a nice extensive list including the popular Standard Template Library (STL).

Out of these, I have worked with Posix Threads for Win32, Boost and Mozilla XUL.

In addition to this Mozilla has a Cross Platform Component Object Model (XPCOM), which is the underlying base for every Mozilla application. I have also used Xerces C++ Parser. In addition to this, Ch language environment, an embeddable interpreter for cross-platform C/C++ scripting, is available for developing XML-based applications using C/C++..

Andrei Alexandrescu has developed a cross-platform library, called Loki (through his book Modern C++ Design), for illustrating benefits of policy-based programming. It employs template metaprogramming to the fullest.

Then there are Blitz++ and Matrix Template Library (MTL) (via O’Reilly Network).

As mentioned earlier, the code development should be disciplined to ensure portability. Mozilla has a C++ portability guide for making code portable.

I am sure all the libraries are not included here, if you know any that are not mentioned here, feel free to add them in the comments. I will update the post accordingly.

Copyright Abhijit Nadgouda.

Discussion [Participate or Link]

  1. How Interface Has Helped Me | iface thoughts said:

    [...] C++ code after I have understood the purpose of interface. I understand C++ itself, and many of its libraries much better, which I still like. And I will not hesitate to say that it has had an impact on me [...]

  2. Shlomi Fish said:

    Hi Abhijit!

    Thanks for linking to my page about the topic. However, it would be preferable if you linked “Shlomi Fish” to my homepage or to a more representative page, and “extensive list” to the list itself. But it’s a nice post, and I may draw inspiration from it.

    I also subscribed to your blog using my RSS reader.

    Regards,

    – Shlomi Fish

  3. Shlomi Fish said:

    Duplicate comment yada yada yada

    Hi Abhijit!

    Thanks for linking to my page about the topic. However, it would be preferable if you linked “Shlomi Fish” to my homepage or to a more representative page, and “extensive list” to the list itself. But it’s a nice post, and I may draw inspiration from it.

    I also subscribed to your blog using my RSS reader.

    Regards,

    – Shlomi Fish

  4. Shlomi Fish said:

    Hi!

    Your blog ate two of my comments - please restore them. WordPress is a PoS.

  5. Abhijit Nadgouda said:

    Shlomi, links fixed. The comments were added properly, but caching did not show them immediately. Need to look into it. Thanks!

Say your thought!

Who are you?

If you want to use HTML you can use these tags: <a>, <em>, <strong>, <abbr>, <code>, <blockquote>. Closing the tags will be appreciated as this site uses valid XHTML.

freshthoughts

contactme

Abhijit Nadgouda
iface Consulting
India
+91 9819820312
Y!: anadgouda
GTalk: anadgouda@gmail.com
MSN: anadgouda@hotmail.com
Skype: anadgouda
My bookmarks

currentproject

Complete Wellbeing

badgesand...

This is the weblog of Abhijit Nadgouda where he writes down his thoughts on software development and related topics. You are invited to subscribe to the feed to stay updated or check out more subscription options. Or you can choose to browse by one of the topics.

Twitter - #mumbai - The city has started working today. The fears are still there, but the spirit will help in fighting it.