Compiling C- code for 3rd Edition Target Devices (UREL mode)
Article Metadata
This article is worth for developers who are porting their c code to run on Symbian 3rd Edtion devices
Following are the major changes that have to be done :
1> Go to the following path
C:\Symbian\9.1\S60_3rd\Epoc32\tools\compilation_config
OR
$(EPOCROOT)\tools\compilation_config
2> Open the gcce.mk file
search for the following lines
# For .c Source files
C_LANG_OPTION=-x c
Edit the above line as
# For .c Source files
C_LANG_OPTION=-x c++
The above change tells the compiler that the C files will be compiled by C++ compiler
Also Add the following line in the .MMP file
YourApp.mmp
// This tells the compiler to supress typecasting errors
OPTION CW -lang c++
OPTION ARMCC --cpp
//Informing the compiler that the source is C++
OPTION GCC -x c++
Also Visit this link for more information on C Code porting Mixing and Compiling of C code on Symbian 3rd Edition


Gee, this sounds like it should be entitled, "For C++ programmers who didn't name their files correctly...".
Don't mix the streams...
UncleOp 04:11, 10 January 2008 (EET)