Introduction
There are some cross-platform C++ libraries and some of them contain UI Frameworks.
I introduce these libraries and my experiences of them here.
Cross-platform C++ libraries with UI Frameworks
There are two cross-platform C++ libraries which have UI Frameworks as I know. Both of these two libraries are implemented based on adapter pattern.
Qt by Nokia
Qt (pronounced officially as cute /ˈkjuːt/, though often incorrectly as Q.T. /ˈkjuːˈtiː/) is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) (in which cases Qt is classified as a widget toolkit), and also used for developing non-GUI programs such as command-line tools and consoles for servers. Qt is most notably used in Autodesk Maya, Google Earth, KDE, Adobe Photoshop Elements, OPIE, Skype, VLC media player, VirtualBox, and Mathematica, and by the European Space Agency, Siemens, Volvo, Walt Disney Animation Studios, Samsung, Philips, and Panasonic. - from Wikipedia
Qt SDK combines the Qt framework with tools designed to streamline the creation of applications for Symbian and Maemo, MeeGo (Nokia N9) in addition to desktop platforms, such as Microsoft Windows, Mac OS X, and Linux.
I want to mention two most impressed things while I've been using Qt: One is well-designed architecture for cross-platform UI framework, the other is Qt Creator, powerful cross-platform integrated development environment, including UI designer tools and on-device debugging. I really like Qt Creator and recommend it even though it crashes sometimes :). If you are sick of slow response of MSVS or XCode, I'd like to advice you to have a chance of using Qt Creator. It really responses very quick and is easy to add source code files to project and to modify project setting. Qt Creator use gcc compiler by default with Mac and Linux, and MinGW with Windows but you can change it into MSVC compiler or Intel compiler.
Qt is available under GPL v3, LGPL v2 and a commercial license. Learn more about licenses here.
wxWidgets
wxWidgets (formerly wxWindows) is a widget toolkit for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with minimal or no code changes. It covers systems such as Microsoft Windows, Mac OS X (Carbon and Cocoa), iOS (Cocoa Touch), Linux/Unix (X11, Motif, and GTK+), OpenVMS, OS/2 and AmigaOS. A version for embedded systems is under development. - from Wikipedia
wxWidgets provides MFC like classes, thus it is a good option for C++ developers who are familier to MFC or WTL. But there are few things to know attentively. UI classes in wxWidgets are usually using self destruction when their windows are destroyed. If you use these UIs without having enough understanding of their self destruction mechanisms, it will bring serious problems such as abnormal termination by double deletion of the object. wxWidgets is still under development and upgrading. It's getting better as it's version is upgraded, but I am still experiencing some problems with Mac OS X such as unimplemented APIs or odd behaviors.
Cross-platform C++ libraries without UI classes
There are several cross-platform C++ libraries without UI functions and these libraries are widely used to develop server side applications. Usually these libraries are liter than GUI libraries.
POCO
The POCO C++ Libraries are a collection of open source class libraries for developing network-centric, portable applications in C++. POCO stands for POrtable COmponents. The libraries cover functionality such as threads, thread synchronization, file system access, streams, shared libraries and class loading, sockets and network protocols (HTTP, FTP, SMTP, etc.), and include an HTTP server, as well as an XML parser with SAX2 and DOM interfaces and SQL database access. The modular and efficient design and implementation makes the POCO C++ Libraries well suited for embedded development. - from Wikipedia
I applied POCO to my latest project and am very satisfying with it. The design of classes shows good hierarchy and it is well understandable. I could use its functionality without spending much time to read the document and all of my codes have been working correctly without fixing or modification. I can say that POCO is a very stabilized library just like STL, and a nice solution for cross-platform development. I want to thank POCO developers for making this nice open source library.
BOOST
The Boost C++ Libraries are a collection of free libraries that extend the functionality of C++.
C++, Objective-C, Cross-platform UI Application Development, and Performance enhancement using SIMD and Parallel Processing
Showing posts with label cross-platform. Show all posts
Showing posts with label cross-platform. Show all posts
Sunday, July 10, 2011
Cross-platform C++ libraries
Things to consider to implement cross-platform enduser applications
Introduction
When we look back just a few years ago, Microsoft windows had shared over 90% of PC Operating System market and most of desktop enduser application developers had considered only this Windows environment. But these days, Mac OS X market share up 29%. Thus it's time to consider our desktop software supporting not only windows but also Mac OS X.
What we should consider
There are several differences between Windows and Mac OS X such as file path representation, case sensitivity for file names and directory names, storing method for configurations of applications, user access policies for system resources, socket APIs, and etc. Most of all, the hardest things to support cross-platform with Windows and Mac OS X are the differences of GUI APIs and abstract implementation of the UI event loop. There are several UI controls in both operating systems and some of them are similar but some controls exist only in Windows or only implemented in Mac. Event hough some UI controls look similar to both sides but APIs to create and to manage these are very different.
Our Goal
There are several ways to implement cross-platform enduser applications. But if possible, make it into one source code and not to be modified many things to compile with other operating systems so that we may reduce development and maintenance costs.
I would like to share my experiences of implementation of some of commercial cross-platform enduser application development here to help C++ software developers who are looking for ways to easily develop enduser application for both Windows and Mac.
When we look back just a few years ago, Microsoft windows had shared over 90% of PC Operating System market and most of desktop enduser application developers had considered only this Windows environment. But these days, Mac OS X market share up 29%. Thus it's time to consider our desktop software supporting not only windows but also Mac OS X.
What we should consider
There are several differences between Windows and Mac OS X such as file path representation, case sensitivity for file names and directory names, storing method for configurations of applications, user access policies for system resources, socket APIs, and etc. Most of all, the hardest things to support cross-platform with Windows and Mac OS X are the differences of GUI APIs and abstract implementation of the UI event loop. There are several UI controls in both operating systems and some of them are similar but some controls exist only in Windows or only implemented in Mac. Event hough some UI controls look similar to both sides but APIs to create and to manage these are very different.
![]() |
| Things to consider for cross-platform development for enduser applications |
UI controls for windows are created and managed by WIN32 APIs. WIN32 APIs are C based API which use 'handle's called HWND to create and manage UI controls. Carbon or COCOA is used on Mac OS X environment. Carbon is the C based old API and COCOA is the Objective-C based API to manage UI controls.
![]() |
| APIs for several Operating Systems |
There are several ways to implement cross-platform enduser applications. But if possible, make it into one source code and not to be modified many things to compile with other operating systems so that we may reduce development and maintenance costs.
![]() |
| Goal to cross-platform enduser application development |
Subscribe to:
Posts (Atom)



