Bailey O.H.Embedded systems.Desktop integration.2005
.pdf
140 |
Chapter 5 / Developing the Desktop User Application |
|
|
Figure 5-17
The visual designer is not available on the Linux or Solaris versions, but I think we can expect to see a cross-platform visual designer for C++BuilderX very soon. Since C++BuilderX is an open architecture, new compilers and tools can be added by the user. While it does include compilers and other tools, C++BuilderX is a development framework. The advantages are consistent user interface and functionality on all supported platforms. If you are already familiar with Borland products and want cross-platform compiler support for GNU in addition to the Intel compiler suite for both platforms, then C++BuilderX is a good addition to any toolbox. The following screen shot is C++BuilderX running on Linux.
Chapter 5 / Developing the Desktop User Application |
141 |
|
|
Figure 5-18
Even though there is no visual designer, the user interface is consistent and easy to use.
Emacs
Emacs is an open-source framework that has been around for many years. There are textand GUI-based versions of the program available. Emacs is best known as a very flexible editor. It uses multi-key sequences to control the program, which is a carryover from the early days of WordStar. If you’re accustomed to a menu bar, the Emacs learning curve may be a bit too much. Remembering multi-key sequences is no trade-off for a menu system. Emacs is very flexible so you can program it to compile within the editor and start the debugger. It is not an integrated IDE like C++BuilderX.
Chapter 5
142 |
Chapter 5 / Developing the Desktop User Application |
|
|
The following is a screen shot of Emacs running on Windows in a Cygwin session.
Figure 5-19
While Emacs is not as pretty as an integrated IDE, it is fully configurable. As you can see in Figure 5-19, its many multi-key sequences provide Emacs with flexibility. The GUI version is more familiar to those who are using Windows or another desktop manager.
Chapter 5 / Developing the Desktop User Application |
143 |
|
|
The following screen shot is the GUI version of Emacs running on Windows in a Cygwin session.
Figure 5-20
The familiar Windows Start menu is displayed at the bottom. Once a Cygwin session is started and running, X Windows is started. When X Windows is running, Emacs is invoked. While the mouse can be used for some features, Emacs is still heavily dependent on multi-key sequences. Even so, Emacs does work identically on all supported platforms.
Chapter 5
144 |
Chapter 5 / Developing the Desktop User Application |
|
|
The following screen shot is Emacs running on a Linux desktop.
Figure 5-21
GDB
GDB is the GNU debugger. This is a professional-quality debugger that allows source line debugging, breakpoints, variable watches, and many other features. Some versions of GDB allow remote debugging through a serial line. You can modify GDB to suit your own needs since the source code is included. Emacs and C++BuilderX support GDB either directly or by invoking the debugger in a shell. C++BuilderX runs GDB within a window as seen in the following figure.
Chapter 5 / Developing the Desktop User Application |
145 |
|
|
Figure 5-22
The GDB debugger is also supported in Cygwin as shown in Figure 5-24.
Chapter 5
Figure 5-23
146 |
Chapter 5 / Developing the Desktop User Application |
|
|
Regardless of how the debugger is invoked, it looks very similar and functions the same.
The following shows a debug session on Linux using C++BuilderX.
Figure 5-24
The debugging window is the center window on the right side. Two breakpoints are set and the program has stopped on breakpoint one. The bottom window is the direct command window for GDB. Commands can be entered directly or by using the mouse to select the debugging functions at the bottom of the C++BuilderX window. The red square and green arrow on the tab are debugger commands.
Chapter 5 / Developing the Desktop User Application |
147 |
|
|
Choosing the Right Tools for the Design
As you can see we have a variety of choices and several ways to accomplish cross-platform compatibility. Our design calls for a single-source code base for cross-platform compatibility. Let’s list our options explored thus far by category.
Developer libraries:
GTK+
Qt
wxWindows
Zinc interface library
.NET framework:
|
Microsoft .NET |
(Windows only) |
|
Mono |
(Windows and Linux) |
|
GNU .NET |
(Linux only) |
Cross-platform compilers with IDE:
Borland Delphi/Kylix
Borland C++Builder/Kylix
Cross-platform compilers only:
Intel C++
GNU C++
Cross-platform tools:
Emacs
GDB
Chapter 5
148 |
Chapter 5 / Developing the Desktop User Application |
|
|
I’ve broken down the compilers into those with an integrated development environment and those without. We’ll call our selected suite of tools our development workbench. To build a complete set of development tools we need the following:
Compiler
Editor
Debugger
Forms designer
Next, we’ll build a matrix to see how a product or product combination fits our requirements. While product cost is an issue, the price of a product can quickly be overshadowed by poor documentation, long learning curve, or poor and inconsistent support. In the following table each row represents a bundled development solution for us to examine. Each bundle is rated by two factors — included tools and a rating of 1 to 5 on documentation, support, and available learning or tutorial tools.
Table 5-3
Compiler |
Editor |
Debugger |
Form |
Doc |
Support |
Tutorial |
Overall |
|
|
|
Designer |
|
|
|
|
|
|
|
|
|
|
|
|
Delphi Kylix |
Included |
Included |
Included |
Printed |
Available1 |
Included |
5 |
C++ |
Included |
Included |
Included |
Printed |
Available1 |
Included |
5 |
BuilderX |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Intel C++ 72 |
Not |
Not |
Not included |
Online |
Web |
Included |
3.5 |
|
included |
included |
|
|
based |
|
|
|
|
|
|
|
|
|
|
GCC |
Emacs |
GDB |
DialogBlocks3 |
Online4 |
Web |
Available6 |
2.5 |
|
|
|
|
|
based5 |
|
|
GCC |
C++ |
C++ |
DialogBlocks |
Online7 |
Available8 |
Included8 |
4.0 |
|
BuilderX |
BuilderX |
|
|
|
|
|
|
|
|
|
|
|
|
|
C++ |
Included |
Included |
DialogBlocks |
Online |
Available |
Online |
4.5 |
BuilderX |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Intel C++ 7 |
C++ |
C++ |
DialogBlocks |
Online |
Available |
Online |
4.3 |
|
BuilderX |
BuilderX |
|
|
|
|
|
|
|
|
|
|
|
|
|
GCC |
Zinc |
GDB |
Zinc |
Online |
None |
Online |
3.3 |
|
|
|
|
|
|
|
|
Intel C++ 7 |
Zinc |
GDB |
Zinc |
Online |
None |
Online |
3.8 |
|
|
|
|
|
|
|
|
Chapter 5 / Developing the Desktop User Application |
149 |
|
|
Notes:
1.Installation support is free; tech support by phone has per-incident fee
2.Intel C++ is a replacement compiler for Microsoft and GNU
3.Third-party product
4.Online documentation may not be up to date
5.Email support may take several weeks for response
6.Independent web tutorials not part of product
7.Specific compiler documentation from GNU.org (see 4 above)
8.Provided by Borland
Overall ratings are based on a combination of experience and user comments. The ratings range from 2.5 to 5.0. As you might expect, commercial products carry a higher rating due to integration of editor and debugger, full-time support, and documentation. Let’s examine the results from lowest to highest.
The GCC, Emacs, GDB, and wxWindows combination is a very solid workbench, but multiple sources for documentation and in some cases outdated documentation take the overall rating down.
Using the Zinc interface library scored a little higher because the Zinc documentation is complete. It consists of an installation manual, tutorial, and reference manual. The Zinc Designer provides the ability to visually develop an interface and edit the associated code. This combination didn’t score higher because there is no ongoing development effort for Zinc. It is worth noting that the Zinc library is compatible with Microsoft C++ on Windows and GNU C++ on Linux. The Intel C++ compiler is compatible with both of these, allowing the Zinc library to be compiled on both platforms with the same compiler.
The Intel C++ 7 product scored lower by itself because it doesn’t have an integrated editor or visual forms designer. It is compatible with Microsoft C++ and GCC, which means that any third-party tool that supports GCC also supports the Intel 7 C++ compiler. If you have Visual C++ version 6 or 7 on Windows, the Intel C++ 7 compiler can be used in its place. When we bundle the Intel compiler with C++BuilderX and the wxWindows library, its rating goes up. Most of this increase is
Chapter 5
