At 10:23 PM -0800 2/4/00, Greg Lutz wrote:
>Well, my actual example involved calling WinCreateWindow() from within the
>constructor that was called to initialize a global variable. But to illustrate the
>point about the CodeWarrior linker, here's an example (slightly extended for dramatic
>effect!).
>
>Create a project using C++ stationery (this example uses the stock CW 6.0 release,
>with the PalmOS 3.0 SDK). Create the following file "sub.cpp" and add it to the
>project:
>
> #include <Pilot.h>
>
> class C {
> public:
> C() {
> ErrDisplay("Got here");
> }
> };
> C c;
>
>
>In the target settings dialog, set global optimizations to level 2. Build and
>execute the application(1). It will do nothing.
Thanks for the example.
IMHO, this is incorrect behavior.
You have a global variable with a constructor.
That constructor has to be run, precisely because of possible side effects.
[ More steps removed ]
-- Marshall
"The era of big government is over."
Bill Clinton, State of the Union Address, January 23, 1996
Marshall Clow Adobe Systems <mailto:[EMAIL PROTECTED]>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html