Ebdon.Net

Code Warrior

Front Page | Recent Changes | Title Index | Amateur Radio | Software Development
» Contest Calendar » Code Warrior
My experiences of using the Code Warrior C++ cross-compiler on Microsoft Windows 2000 to target PalmOS devices.

Code Warrior Versions

The following applies to Metrowerks Code Warrior 9.0. There are two patches available, 9.1 and 9.2, but I haven't tried these.

Libraries

The Pol Library is an MFC look alike, except that there are significant differences - e.g. they way buffer handling works in CString.

Support for the standard library is switched off by default. It's been suggested that there may be a conflict between POL and STD, but I haven't tried using them together. Both libraries are supplied by Metrowerks and are in their own namespace (POL and std) which is a good sign. The documentation tends to refer to MSL when it's talking about the standard library.

Standard Types

Support for bool is switched off by default. unsigned char is typedef'd as Boolean in PalmTypes.h. Switching on support for bool doesn't seem to cause a problem with the existing code base or the POL library, so I've started using it.

Templates

By default the compiler parses templates in a pre-standard manner. Switching on ISO compliant template parsing caused a number of compilation errors in the POL library, so I'm reluctantly compiling with this option switched off.

As the project doesn't use the standard library various POL collection template classed are used, e.g. POL::CArray instead of std::vector.

Debugging etc.

Assertions

Using assertions has proved problematic. The <cassert> header is provided, and
    assert( true );
displays a message box asking if you want to debug. Unfortunately it doesn't do what it claims. According to the on-line manuals assert() may not be supported on all platforms. So I tried switching to POL's ASSERT() macro, but this is no better.

Break Points

When debugging you can set break points, event points and watch points.

Event points are quite useful, and are sub-divided into:

The log point allows a message to be displayed when execution reaches the given point, and it can optionally break into the debugger. The displayed (or spoken) message can include evaulated statements. I'm hoping this feature will provide an alternative to the MFC / POL TRACE macros. Unfortunately there seems to be no way to edit a log point, you can only insert or delete them.

Terminology

There's a minor problem with terminology, right clicking on a class name produces a context menu that offers to "go to class declaration for..."; in fact it goes to the class definition.

|

File under: Category Software Development.

Front Page | Recent Changes | Title Index | Amateur Radio | Software Development
Print this page
Find page by browsing, searching or an index
Edited March 2, 2005


Copyright (c) Terry Ebdon, all rights reserved.
Valid XHTML 1.0!Valid CSS![Valid RSS]