wxWindows for Cross-Platform Coding

The well-tested wxWindows is the toolkit behind the upcoming Chandler groupware.

Multiplatform development has become a mainstream phrase over the last few years, from the halls of Redmond to open-source initiatives. The uses of this phrase all seem to revolve around things like Java, .NET, V and Qt; however, let's not forget wxWindows.

Whether you're porting some MFC code to Linux or simply want to make your application available to the broadest user demographic, wxWindows fits the bill. Strangely, not many people seem to have heard of it, but hopefully, this article assists in making the information more available.

Why choose wxWindows over these other development tools? That's a fair question, and the answer is different for each one.

Compared to the Different Tools

Although Qt is the standard for building KDE applications, wxWindows can be used as well. Qt's Microsoft Windows version is not free for commercial use, but wxWindows is, and Qt requires a special preprocessor for the event system.

Microsoft's .Net and Ximian's Mono, as well as Java, aren't really toolkits as much as they are technologies. These technologies add a layer to the application that can rob an application of performance. This can be debated as a “development time vs. performance” issue and is different depending on the life cycle of the application. Instead of getting into yet another language war, we'll simply say, “your mileage may vary.”

V is simply not as flexible as wxWindows; it doesn't support as many compilers.

In comparing wxWindows to these other multiplatform development tools and languages, it's important to mention that wxWindows stands on its own merits and is not limited to the comparisons.

With wxWindows, you gain the usual open-source freedoms—the freedom to use without charge, the freedom to modify and the freedom from the risk of vendors disappearing (or updating their libraries or tools so that you have to buy a new one). Plus, you have the freedom to run the application on a variety of operating systems, including UNIX/Linux, Windows, Mac OS 9, Mac OS X and OS2. What's more, it gives you a native look and feel on each operating system. The license for wxWindows is flexible and has been approved by the Open Source Initiative.

With about 11 years behind it, wxWindows is a stable, mature development library with real-time support through the main mailing lists found on the web site, wxWindows.org. Many features are available through more than 300 classes and 5,000 functions. Porting an application from the MFC is also straightforward with this library.

Applications That Use wxWindows

Some major companies are using wxWindows, including AMD, the Intel Graphics Lab, the Compaq Alpha Microprocessor Development Group, Netscape and Lockheed Martin. The Open Source Applications Foundation is implementing it (using wxPython) in their new program, Chandler, for managing personal information and collaborating with others.

Helpblocks (www.helpblocks.com) is an application that creates multiplatform Help files and is developed with the wxWindows library running on both Windows and Linux. Other applications include Vulcan 3-D (modeling software for the mining industry, and more), Display Doctor from SciTech, Intuitive MX (a multitrack audio mixer with 3-D representation of the mixing stage, by Intuitive Works) and Ground Control Station from Geneva Aerospace. Your application could be next on this list.

Beginning Linux Development with wxWindows

You'll need GCC and also can use tools such as gdb, ddd, Emacs and an IDE such as Anjuta. To compile on Windows, you may need a cross-compiler. Most importantly, you'll need the wxWindows library itself, which also is available at the wxWindows web site as a download or CD purchase. The latest stable release at the time of this writing is version 2.4.0.

Despite what many of us do, it's a good idea to read the documentation relevant to Linux development that is found in the library package.

Also, it would be wise to subscribe to the wx-user mailing list (found under Support at wxWindows.org), in case you run into difficulties. The most reasonable thing to do is search the archives to see if your question already has been asked.

The library itself comes with 70+ example applications that demonstrate almost everything imaginable you would want to do with it; these in themselves are probably the best documentation because you can tinker with a working application and see how it was done. Once you get the library and become familiar with how to use it with your tools, you're ready to start coding.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: wxWindows for Cross-Platform Coding

xxhimanshu's picture

Hello Sir,

I am newbie to cross platform applcaition development and I want to develop an applciation for Linux as well as windows. Please guide me through.

Looking through wxWindows and I have installed the necessary libs and softwares including devc++ and wxWindows and am able to compile and create some simple forms using it.

I need just a refernece or guide so as what shud be the considerations and necessities while developing a cross platform application. How to proceed with it and how to compile it as well as can we do it the way we want it to??

I need to create a sample applciation and the steps as how to create an applciation platform independent. As per the documentation provided by you. I am sure that you cud guide me towards the goal.

Any help or pointers are thoroughly appreciated. Or maybe some documentation as how to proceed with the same.

Looking forward to a soomer response.

Thanks a lot in advance.

Regards,
Himanshu

Re: wxWindows for Cross-Platform Coding

Anonymous's picture

Hello Sir,

I am newbie to cross platform applcaition development and I want to develop an applciation for Linux as well as windows. Please guide me through. I saw your article at sourceforge about linuxjournal.

http://www.linuxjournal.com/comments.php

Looking through wxWindows and I have installed the necessary libs and softwares including devc++ and wxWindows and am able to compile and create some simple forms using it.

I need just a refernece or guide so as what shud be the considerations and necessities while developing a cross platform application. How to proceed with it and how to compile it as well as can we do it the way we want it to??

I need to create a sample applciation and the steps as how to create an applciation platform independent. As per the documentation provided by you. I am sure that you cud guide me towards the goal.

Any help or pointers are thoroughly appreciated. Or maybe some documentation as how to proceed with the same.

Looking forward to a soomer response.

Thanks a lot in advance.

Regards,
Himanshu
xxhimanshu@yahoo.com

White Paper
Fabric-Based Computing Enables Optimized Hyperscale Data Centers

Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.

Learn More

Sponsored by AMD

White Paper
Red Hat White Paper: Using an Open Source Framework to Catch the Bad Guy

Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6

Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.

Learn more about catching the bad guy in this free white paper.

Learn More

Sponsored by DLT Solutions