Michael Rodrigues wrote:
> The X11R6 libraries are
> being used to handle the graphic realted parts.
Will X run without an underlying Unix/Linux support? Seems a bit
heavyweight for such a limited part. Do you have external memory
> My querry was,
> 1. could i use CPP (C++) to develop my GUI (using the same setup as
> mentioned above).
You can use C++, and mix C++ and C libraries.
> 2. are there any precautions / care that i should be taking while taking
> a plunge at CPP
C++ has additional runtime set-up requirements. Your crt0.s must include
code to invoke the constructors of statically allocated objects. I have
seen crt0.s implementations that do not include such code so static
objects will not be correctly initialised when main() is started.
The newlib sbrk stub must be implemented to allow the 'new' operator to
work since it is implemented using malloc().
You may want to avoid dynamic memory allocation due to lack of
determinism or resource, and to avoid memory fragmentation. Much of the
standard library makes extensive use of dynamic memory, so you may wish
to avoid that too. The STL and sting libraries add significantly to code
size. Note also that some library calls throw exceptions. The 'new'
operator also thors exceptions rather than returning NULL like malloc().
You can include <new.h> and use 'new(std::no_throw)' instead of plain
When mixing C and C++, be aware that C++ has different linkage
conventions. C header files used for C++ linkage must have the extern
"C" declaration within conditional compilation, and C++ interfaces to be
used in C code must have been compiled with extern "C" declarations. See