Global Writeable Static Data (WSD) pre-process variables that exists during the lifetime of the process. Sometimes we need WSD for defining variables that are used in some other files. This case is usually happen when porting code from non-Symbian OS enviroment.
EKA1 (EPOC_Kernel_Architecture_1), which is used on Symbian OS 6.1, 7.0, 7.0s, 8.0a, 8.1a, support WSD in EXE only. We cannot define WSD on DLL or APP. If we try to define it, the compiler will report "initialized data" error message.
There are some workarounds to use WSD on EKA1:
EKA2 (EPOC_Kernel_Architecture_2), which is used on Symbian OS 8.0b, 8.1b and the newer version 9, support WSD in EXE and DLL. However, there is a little bit trick for DLL because we have to add the following macro to the .mmp file:
EPOCALLOWDLLDATA
There is some cost, though, which needs to be carefully considered when using WSD on EKA2. Just a quick list of what has to be taken into account: