If the developers want to use any of the P.I.P.S. APIs while writing some Symbian application, they need to link to the corresponding library. The only difference being that the developer does not have to link with the STATICLIBRARY libcrt0.lib in the MMP file.
There are no additional P.I.P.S. specific changes that need to be done in the source file in this case. This is possible, because the P.I.P.S. developer of does not have to call any library initialization routine before use or cleanup routine after use.
Some of the P.I.P.S. APIs assume that a cleanup stack is created and there is a top-level TRAP. If the developer does not create either of the two, calling such APIs may lead to application crash.
Hybrid application can also contain threads created using both RThread::Create() and pthread_create() , and can still use P.I.P.S. APIs in both the threads. In case of RThread::Create() the developer has to create cleanup stack and a top level TRAP for this thread in the thread entry Function, if it is required; else this thread may crash or panic.
An application can have both C++ and C source codes. In this case, in order to give C linkage to C++ code- that is calling a function defined in a C++ file that may have C++ code, use extern āCā. For example:
// File: sample.c void OtherFoo(); void Foo() { OtherFoo(); } // File: useme.cpp extern āCā { void OtherFoo() { //Can use any C++ code here //Can use Symbian C++ code here } }
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.