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:
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| 请教:Client/Server调用另一个DLL创建TApaTask时报错KERN-EXEC -3 | landerluu | Symbian | 4 | 2008-07-22 11:11 |
| What is this Error?ERROR:PETRAN - PE file preprocessor V01.00 (Build 192) | jennie | Carbide.c++ and CodeWarrior Tools | 5 | 2007-09-19 07:35 |
| Posting data to a server | ms_sarwar1 | General Symbian C++ | 28 | 2007-10-27 14:12 |
| illegal pure syntax | sopta007 | General Symbian C++ | 3 | 2004-02-05 15:15 |
| How to record High score? | eggy_hj | Mobile Java General | 5 | 2003-05-15 16:05 |