C++ constructors are not be invoked when the class instance is at global
level in a dynamic lib. For example, the CMyString constructor gets invoked
if the following code is in the main program but not if it is in a dynamic lib.
Does anyone know a correction for this?
#include <stdio.h>
CMyString::CMyString (char * szInit)
{
printf ("CMyString ctor: %s\n", szInit);
strcpy (szText, szInit);
}
CMyString::operator const char * () const
{return (LPCSTR) szText;}
const CMyString szSunTableFileName ("SunTable.txt in lib");
//------------------------------------------------------------------*
// LoadSunTable ()
// Load the sunrise/sunset times to a file.
//------------------------------------------------------------------*
void LoadSunTable ()
{
printf ("LoadSunTable: %s\n", (LPCSTR) szSunTableFileName);
}
Eldon Ziegler
ProAtion Systems
[EMAIL PROTECTED]
http://www.proation.com
_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.