Ticket #887: Re-enable compile as C++ option for libraries as part of making exception work in Symbian
 - also added pjlib-test in bld.inf
 - added pjlib-test.pkg
 - changed hash.c to hash_test.c in pjlib_test




git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2768 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/build.symbian/bld.inf b/build.symbian/bld.inf
index f8dd360..b516a1d 100644
--- a/build.symbian/bld.inf
+++ b/build.symbian/bld.inf
@@ -35,3 +35,4 @@
 symbian_ua.mmp
 ..\pjsip-apps\src\symbian_ua_gui\group\symbian_ua_gui.mmp
 gnumakefile ..\pjsip-apps\src\symbian_ua_gui\group\Icons_aif_scalable_dc.mk
+pjlib_test.mmp
diff --git a/build.symbian/pjlib.mmp b/build.symbian/pjlib.mmp
index 3b2e9cf..ec4a990 100644
--- a/build.symbian/pjlib.mmp
+++ b/build.symbian/pjlib.mmp
@@ -22,6 +22,12 @@
 MACRO		PJ_M_I386=1
 MACRO		PJ_SYMBIAN=1
 
+// Must compile as C++, otherwise exception would not work
+OPTION          CW -lang c++
+OPTION          ARMCC --cpp
+OPTION          GCC     -x c++
+OPTION          GCCE    -x c++
+
 //
 // Platform independent source
 //
diff --git a/build.symbian/pjlib_test.mmp b/build.symbian/pjlib_test.mmp
index 13783c2..f779591 100644
--- a/build.symbian/pjlib_test.mmp
+++ b/build.symbian/pjlib_test.mmp
@@ -8,6 +8,12 @@
 MACRO		PJ_M_I386=1
 MACRO		PJ_SYMBIAN=1
 
+// Must compile as C++, otherwise exception would not work
+OPTION CW -lang c++
+OPTION ARMCC --cpp
+OPTION GCC -x c++
+OPTION GCCE -x c++
+
 #if defined(PJ_BUILD_DLL)
 MACRO		PJ_DLL
 LIBRARY		pjlib.lib 
@@ -24,7 +30,7 @@
 SOURCE	exception.c
 SOURCE	fifobuf.c
 SOURCE	file.c
-SOURCE	hash.c
+SOURCE	hash_test.c
 SOURCE	ioq_perf.c
 SOURCE	ioq_tcp.c
 SOURCE	ioq_udp.c
@@ -63,3 +69,6 @@
 STATICLIBRARY   eexe.lib ecrt0.lib
 #endif
 
+// Need a bit of mem for logging in the app.
+EPOCSTACKSIZE		32768
+
diff --git a/build.symbian/pjlib_test.pkg b/build.symbian/pjlib_test.pkg
new file mode 100644
index 0000000..758769f
--- /dev/null
+++ b/build.symbian/pjlib_test.pkg
@@ -0,0 +1,18 @@
+; pjlib_test.pkg

+

+; Languages

+&EN

+

+; Header

+;#{"pjlib_test"},(0x200235D3), 0, 1, 1

+#{"pjlib_test"},(0xA000000D), 0, 1, 1

+

+; Platform compatibility

+[0x101F7961], *, *, *,{"Series60ProductID"}

+

+; vendor

+%{"PJSIP"}

+:"PJSIP"

+

+; Target

+"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\pjlib_test.exe"-"!:\sys\bin\pjlib_test.exe"

diff --git a/build.symbian/pjlib_util.mmp b/build.symbian/pjlib_util.mmp
index c2d6ebe..bdfab84 100644
--- a/build.symbian/pjlib_util.mmp
+++ b/build.symbian/pjlib_util.mmp
@@ -22,6 +22,12 @@
 MACRO		PJ_M_I386=1
 MACRO		PJ_SYMBIAN=1
 
+// Must compile as C++, otherwise exception would not work
+OPTION          CW -lang c++
+OPTION          ARMCC --cpp
+OPTION          GCC -x c++
+OPTION          GCCE -x c++
+
 //
 // PJLIB-UTIL files
 //
diff --git a/build.symbian/pjmedia.mmp b/build.symbian/pjmedia.mmp
index a712f61..7dd9fc7 100644
--- a/build.symbian/pjmedia.mmp
+++ b/build.symbian/pjmedia.mmp
@@ -20,8 +20,6 @@
 
 SOURCEPATH	..\pjmedia\src\pjmedia
 
-//OPTION		CW -lang c++
-
 //
 // GCCE optimization setting
 //
@@ -30,6 +28,12 @@
 MACRO		PJ_M_I386=1
 MACRO		PJ_SYMBIAN=1
 
+// Must compile as C++, otherwise exception would not work
+OPTION          CW -lang c++
+OPTION          ARMCC --cpp
+OPTION          GCC     -x c++
+OPTION          GCCE    -x c++
+
 //
 // Platform independent source
 //
diff --git a/build.symbian/pjsdp.mmp b/build.symbian/pjsdp.mmp
index e8b41b8..9715550 100644
--- a/build.symbian/pjsdp.mmp
+++ b/build.symbian/pjsdp.mmp
@@ -22,6 +22,12 @@
 MACRO		PJ_M_I386=1
 MACRO		PJ_SYMBIAN=1
 
+// Must compile as C++, otherwise exception would not work
+OPTION          CW -lang c++
+OPTION          ARMCC --cpp
+OPTION          GCC     -x c++
+OPTION          GCCE    -x c++
+
 //
 // Platform independent source
 //
diff --git a/build.symbian/pjsip.mmp b/build.symbian/pjsip.mmp
index e3e2bc2..57c6116 100644
--- a/build.symbian/pjsip.mmp
+++ b/build.symbian/pjsip.mmp
@@ -25,6 +25,12 @@
 MACRO		PJ_M_I386=1
 MACRO		PJ_SYMBIAN=1
 
+// Must compile as C++, otherwise exception would not work
+OPTION          CW -lang c++
+OPTION          ARMCC --cpp
+OPTION          GCC     -x c++
+OPTION          GCCE    -x c++
+
 // PJSIP-CORE files
 
 //SOURCE	sip_auth_aka.c
diff --git a/build.symbian/pjsip_simple.mmp b/build.symbian/pjsip_simple.mmp
index b02d142..a6ddbf2 100644
--- a/build.symbian/pjsip_simple.mmp
+++ b/build.symbian/pjsip_simple.mmp
@@ -25,6 +25,12 @@
 MACRO		PJ_M_I386=1
 MACRO		PJ_SYMBIAN=1
 
+// Must compile as C++, otherwise exception would not work
+OPTION          CW -lang c++
+OPTION          ARMCC --cpp
+OPTION          GCC     -x c++
+OPTION          GCCE    -x c++
+
 // PJSIP-SIMPLE files
 
 SOURCE	errno.c
diff --git a/build.symbian/pjsip_ua.mmp b/build.symbian/pjsip_ua.mmp
index 582873e..11b5e9a 100644
--- a/build.symbian/pjsip_ua.mmp
+++ b/build.symbian/pjsip_ua.mmp
@@ -25,7 +25,11 @@
 MACRO		PJ_M_I386=1
 MACRO		PJ_SYMBIAN=1
 
-//OPTION		CW -lang c++
+// Must compile as C++, otherwise exception would not work
+OPTION          CW -lang c++
+OPTION          ARMCC --cpp
+OPTION          GCC     -x c++
+OPTION          GCCE    -x c++
 
 
 // PJSIP-UA files
diff --git a/build.symbian/pjsua_lib.mmp b/build.symbian/pjsua_lib.mmp
index 5e8113d..0b19781 100644
--- a/build.symbian/pjsua_lib.mmp
+++ b/build.symbian/pjsua_lib.mmp
@@ -25,7 +25,11 @@
 MACRO		PJ_M_I386=1

 MACRO		PJ_SYMBIAN=1

 

-// OPTION		CW -lang c++

+// Must compile as C++, otherwise exception would not work

+OPTION          CW -lang c++

+OPTION          ARMCC --cpp

+OPTION          GCC     -x c++

+OPTION          GCCE    -x c++

 

 // PJLIB-UTIL files