diff -r 80ef3a206772 -r 48780e181b38 Symbian3/SDK/Source/GUID-64D2B0E2-BB5D-4009-ACE5-7A3503016341.dita --- a/Symbian3/SDK/Source/GUID-64D2B0E2-BB5D-4009-ACE5-7A3503016341.dita Fri Jul 16 17:23:46 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-64D2B0E2-BB5D-4009-ACE5-7A3503016341.dita Tue Jul 20 12:00:49 2010 +0100 @@ -12,7 +12,7 @@ Troubleshooting TipsThis section addresses the basic differences in the way things are done in Symbian Platform and in Linux. -
Symbian +<section id="GUID-77D7347D-8DEC-45D0-A677-8FDBDFB8FF81-GENID-1-10-1-13-1-1-5-1-3-1-9-1-3-1"> <title>Symbian directory structure

In Symbian platform, project source files are arranged based on the directory pattern shown below.

@@ -36,7 +36,7 @@

The developer can choose whether to follow these tips.

-
EXPORT_C, +<section id="GUID-77D7347D-8DEC-45D0-A677-8FDBDFB8FF81-GENID-1-10-1-13-1-1-5-1-3-1-9-1-3-2"> <title>EXPORT_C, DEF file and ordinal numbers

This applies only for the DLL target type. If a DLL wants to export an API, the code definition should start with the macro EXPORT_C.

// Declaration @@ -94,7 +94,7 @@ return something; }
-
<codeph>dlsym()</codeph> or <codeph>g_module_symbol()</codeph> +
<codeph>dlsym()</codeph> or <codeph>g_module_symbol()</codeph>

Since DLL entry points are not exported by name, DLL symbol lookup functions do not work on Symbian platform. For more information about alternatives suggested on Symbian platform, see Dynamic @@ -105,7 +105,7 @@ symbol parameter (refer the library's list of exports, the DEF file for the function's ordinal number):

dlsym(&handle, "foo")

needs to be changed to:

dlsym (&handle, "3")
-
Problem with +<section id="GUID-77D7347D-8DEC-45D0-A677-8FDBDFB8FF81-GENID-1-10-1-13-1-1-5-1-3-1-9-1-3-4"><title>Problem with a variable list of arguments in macros

This section suggests a way to overcome the problems faced when macros with a variable list of arguments are used.

#define DEBUG(a,...)

The above statement @@ -114,14 +114,14 @@ static inline void _DEBUG (const char *a, ...) { }

-
Keep +<section id="GUID-77D7347D-8DEC-45D0-A677-8FDBDFB8FF81-GENID-1-10-1-13-1-1-5-1-3-1-9-1-3-5"> <title>Keep changes to OSS to a minimum

While porting the OSS code, keep the changes to the OSS code as few as possible. The OSS code is already tested and used by a bigger community, and is unlikely to have any compilation errors or major logical errors. In many cases code changes that are necessary brings potential logical flaws to the OSS port. Minimum changes to the OSS code while porting also helps in merging to the new OSS.

-
Exporting +<section id="GUID-77D7347D-8DEC-45D0-A677-8FDBDFB8FF81-GENID-1-10-1-13-1-1-5-1-3-1-9-1-3-6"> <title>Exporting variables from a DLL

Exporting data from a DLL is not allowed in Symbian platform . The following pattern can be used:

  1. Do not export global @@ -140,13 +140,13 @@ IMPORT_C int* GlbData (); #define globalVal (*GlbData())

-
Application +<section id="GUID-77D7347D-8DEC-45D0-A677-8FDBDFB8FF81-GENID-1-10-1-13-1-1-5-1-3-1-9-1-3-7"> <title>Application is not loaded

The absence of the dependent libraries could be one of the reasons for the application not to load in the mobile device. On the target device, Symbian platform looks for libraries in c:\sys\bin or in z:\sys\bin.

Do make sure that all the libraries are present in either of the above-mentioned libraries.

-
Capabilities +<section id="GUID-77D7347D-8DEC-45D0-A677-8FDBDFB8FF81-GENID-1-10-1-13-1-1-5-1-3-1-9-1-3-8"> <title>Capabilities not known

Capabilities are specified in the MMP file. The primary information source is the P.I.P.S. API reference documentation. If problems with capabilities remain, one known method to find the capability @@ -155,7 +155,7 @@ for release code it is good practice to give a valid capability in the MMP file in order to have the application successfully signed. The following is a sample of a capability error found in the [Debug Messages] window.

*PlatSec* ERROR - Capability check failed - Process hellogst.exe[10015942]0001 was checked by Thread c32exe.exe[101f7989]0001::ESock_IP and was found to be missing the capabilities: NetworkServices.
-
Environment +<section id="GUID-77D7347D-8DEC-45D0-A677-8FDBDFB8FF81-GENID-1-10-1-13-1-1-5-1-3-1-9-1-3-9"> <title>Environment variables

At the moment, environment variables are not completely supported in Symbian C++. Therefore be wary of using library functions like getenv() which work on environment variables. Make sure the library initialization routine @@ -166,7 +166,7 @@ { setenv ("JPEGMEM ", "XXXXX", 1); }

-
Assembly +<section id="GUID-77D7347D-8DEC-45D0-A677-8FDBDFB8FF81-GENID-1-10-1-13-1-1-5-1-3-1-9-1-3-10"> <title>Assembly code

The syntax for inline assembly code is different in Symbian platform. The following is a code snippet of assembly code syntax in Symbian platform.

EXPORT_C __NAKED__ TUint16 TTemplate::Register16(TUint anAddr) @@ -180,7 +180,7 @@ }

In common practice the assembly code has the extension .CIA in Symbian platform, whereas in Linux the assembly code has the extension .S.

-
Glossary +
Glossary

The following table lists terms used in Linux and their approximate equivalents in Symbian platform: