architecture dependencya problem which sometimes arises from writing multi-platform programs is that the basic c types are not defined the same on all platforms. this holds true for both the length in bits of the standard types (such as int and long) as well as their byte order, which might be little endian (typically on intel computers) or big endian (typically on some unix workstations). wxwidgets defines types and macros that make it easy to write architecture independent code. the types are: wxint32, wxint16, wxint8, wxuint32, wxuint16 = wxword, wxuint8 = wxbyte where wxint32 stands for a 32-bit signed integer type etc. you can also check which architecture the program is compiled on using the wxbyte_order define which is either wxbig_endian or wxlittle_endian (in the future maybe wxpdp_endian as well). the macros handling bit-swapping with respect to the applications endianness are described in the byte order macros section.
|