I have been trying to take some old Symbian C++ code over to Android today using the NDK.
I have little to no C or C++ knowledge so its been a chore, however has to be done.
My main issue is that I'm having trouble porting what I believe is Symbian specifi code to work using the small C/C++ subset that is available with the Android NDK.
Here is a picture of the compilation errors I'm getting using cygwin
I was wondering if anyone could point me in the right direction on how to deal with these errors? For instance is TBool/Int/TUint/RPointerArray/RSocket a Symbian primitive and thats why it wont compile or is it something else?
Also what is ISO C++?
Any tutorials, guides or tips and help would be greatly appreciated.
EDIT:
Here is a code snippet from the .h file I am trying to import followed by the output for the snippet from the compiler.
Could someone guide me on how I would port this Symbian specific code to normal C++?
If I got an idea of whats Symbian specific and how to change it I believe I could change then begin to port the rest myself
#ifndef __RTPSTREAM_H__
#define __RTPSTREAM_H__
class CRTPParser;
class MDataRecorderObserver
{
public:
virtual void DataRecorded(const TDesC8& aData, TUint aCodec, TUint aFramesizeMs)=0;
};
class MRTPStreamDataObserver
{
public:
virtual void AudioDataSent()=0;
virtual void DataReceived(const TDesC8& aData,TUint aCodec, TBool aMarker, TUint aSeq, TUint aTime)=0;
virtual void DataReceived(const TDesC8& aData)=0;
};
$ make APP=ndk-socket
Android NDK: Building for application 'ndk-socket'
Compile++ thumb: socket <= apps/ndk-socket/project/jni/rtpstream.cpp
In file included from apps/ndk-socket/project/jni/com_ciceronetworks_utils_RTPJn
i.h:2,
from apps/ndk-socket/project/jni/rtpstream.cpp:4:
build/platforms/android-3/arch-arm/usr/include/jni.h:489: note: the mangling of
'va_list' has changed in GCC 4.4
In file included from apps/ndk-socket/project/jni/rtpstream.cpp:11:
apps/ndk-socket/project/jni/rtp/RTPStream.h:15: error: ISO C++ forbids declarati
on of 'TDesC8' with no type
apps/ndk-socket/project/jni/rtp/RTPStream.h:15: error: expected ',' or '...' bef
ore '&' token
apps/ndk-socket/project/jni/rtp/RTPStream.h:23: error: ISO C++ forbids declarati
on of 'TDesC8' with no type
apps/ndk-socket/project/jni/rtp/RTPStream.h:23: error: expected ',' or '...' bef
ore '&' token
apps/ndk-socket/project/jni/rtp/RTPStream.h:24: error: ISO C++ forbids declarati
on of 'TDesC8' with no type
apps/ndk-socket/project/jni/rtp/RTPStream.h:24: error: expected ',' or '...' bef
ore '&' token
apps/ndk-socket/project/jni/rtp/RTPStream.h:24: error: 'virtual void MRTPStreamD
ataObserver::DataReceived(int)' cannot be overloaded
apps/ndk-socket/project/jni/rtp/RTPStream.h:23: error: with 'virtual void MRTPSt
reamDataObserver::DataReceived(int)'
apps/ndk-socket/project/jni/rtp/RTPStream.h:30: error: 'TInt' has not been deca
red