Index: /pjproject/branches/symbian/build/cc-mwcc.mak
===================================================================
--- /pjproject/branches/symbian/build/cc-mwcc.mak	(revision 680)
+++ /pjproject/branches/symbian/build/cc-mwcc.mak	(revision 681)
@@ -1,4 +1,4 @@
 export CC = mwccsym2 -c
-export AR = echo ar
+export AR = ar rv
 export LD = mwldsym2.exe -sym full -subsystem windows -msgstyle parseable -nowraplines -nodefaultlibs -addcommand export:_E32Dll\=__E32Dll -shared -export dllexport -stdlib -L"C:\Symbian\9.1\S60_3rd\Epoc32\release\winscw\udeb" -L"C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs" -ledll.lib -leuser.lib -lestlib.lib
 
@@ -7,9 +7,10 @@
 #o
 # -ledll.lib -leuser.lib -lestlib.lib
-export LDEXE = mwldsym2.exe -sym full -subsystem windows -msgstyle parseable -nowraplines -nodefaultlibs -stdlib -L"C:\Symbian\9.1\S60_3rd\epoc32\release\winscw\udeb" -noimplib -m="?_E32Bootstrap@@YGXXZ" -leexe.lib -leuser.lib
+export LDEXE = mwldsym2.exe -sym full -subsystem windows -msgstyle parseable -nowraplines -nodefaultlibs -stdlib -L"C:\Symbian\9.1\S60_3rd\epoc32\release\winscw\udeb" -L"C:\dev\pj\symbian\pjlib\lib" -noimplib -m="?_E32Bootstrap@@YGXXZ"
 export LDOUT = -o 
-export RANLIB = echo ranlib
+export RANLIB = ranlib
 
 export OBJEXT := .o
+export STATICLIBEXT := .lib
 export LIBEXT := .dll
 export LIBEXT2 :=
@@ -26,5 +27,5 @@
 export CC_CXXFLAGS := -sym full -wchar_t off -align 4 -enum int -str pool -nostdinc -exc ms -inline off -msgstyle parseable -nowraplines -O0 -D_UNICODE -D__SYMBIAN32__ -D__CW32__ -D__WINS__ -D__DLL__ -D__WINSCW__ -D_DEBUG -D__SUPPORT_CPP_EXCEPTIONS__ -D__SERIES60_30__ -D__SERIES60_3X__ -w cmdline -w pragmas -w empty -w possible -w unusedvar -w extracomma -w pedantic -w largeargs -w ptrintconv -w tokenpasting -w missingreturn
 export CC_LDFLAGS :=
-export MWLibraries=C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs
-export MWSym2LibraryFiles=gdi32.lib;user32.lib;kernel32.lib;MSL_All_MSE_Symbian.lib;MSL_All_x86.lib;MSL_All_x86_Symbian.lib
+export MWLibraries=C:\dev\pj\symbian\pjlib\lib;C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\Program Files\Carbide\plugins\com.nokia.carbide.cpp.support_1.0.0\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs
+export MWSym2LibraryFiles=libpj-symbian.lib;gdi32.lib;user32.lib;kernel32.lib;MSL_All_MSE_Symbian.lib;MSL_All_x86.lib;MSL_All_x86_Symbian.lib
 
Index: /pjproject/branches/symbian/build/rules.mak
===================================================================
--- /pjproject/branches/symbian/build/rules.mak	(revision 680)
+++ /pjproject/branches/symbian/build/rules.mak	(revision 681)
@@ -6,4 +6,5 @@
 #
 LIB = $($(APP)_LIB)
+STATICLIB = $($(APP)_STATICLIB)
 
 #
@@ -71,8 +72,8 @@
 	@echo LIBDIR=$(LIBDIR)
 
-#$(LIB): $(LIBDIR) $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP)
-#	$(AR)$(LIB) $(OBJS)
-#	$(RANLIB) $(LIB)
-	
+#$(STATICLIB): $(LIBDIR) $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP)
+#	$(AR) $(STATICLIB) $(OBJS)
+#	$(RANLIB) $(STATICLIB)
+
 $(LIB): $(LIBDIR) $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP)
 	$(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$(LIB)) -search \
@@ -80,5 +81,5 @@
 
 $(EXE): $(BINDIR) $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP)
-	$(LDEXE) $(LDOUT)$(subst /,$(HOST_PSEP),$(EXE)) \
+	$(LDEXE) $(LDOUT)$(subst /,$(HOST_PSEP),$(EXE)) -search \
 	    $(subst /,$(HOST_PSEP),$(OBJS)) $($(APP)_LDFLAGS)
 
Index: /pjproject/branches/symbian/pjlib/build/Makefile
===================================================================
--- /pjproject/branches/symbian/pjlib/build/Makefile	(revision 680)
+++ /pjproject/branches/symbian/pjlib/build/Makefile	(revision 681)
@@ -5,4 +5,5 @@
 
 export PJLIB_LIB := ../lib/libpj-$(TARGET_NAME)$(LIBEXT)
+export PJLIB_STATICLIB := ../lib/libpj-$(TARGET_NAME)$(STATICLIBEXT)
 
 ###############################################################################
@@ -13,7 +14,9 @@
 export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
 		   $(HOST_CXXFLAGS) $(CXXFLAGS)
-export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
+export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJLIB_STATICLIB)) \
 		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
 		   $(LDFLAGS) 
+
+
 
 ###############################################################################
@@ -34,4 +37,5 @@
 #
 export TEST_SRCDIR = ../src/pjlib-test
+export TEST_OBJS += 
 export TEST_OBJS += atomic.o echo_clt.o errno.o exception.o \
 		    fifobuf.o file.o \
Index: /pjproject/branches/symbian/pjlib/build/os-symbian.mak
===================================================================
--- /pjproject/branches/symbian/pjlib/build/os-symbian.mak	(revision 680)
+++ /pjproject/branches/symbian/pjlib/build/os-symbian.mak	(revision 681)
@@ -19,5 +19,5 @@
 # the test application.
 #
-export TEST_OBJS += main.o main_symbian.o 
+export TEST_OBJS += main_symbian.o 
 
 #
@@ -30,5 +30,5 @@
 # Additional LDFLAGS for pjlib-test
 #
-export TEST_LDFLAGS += 
+export TEST_LDFLAGS +=  -leexe.lib -leuser.lib -llibpj-symbian.lib
 
 #
Index: /pjproject/branches/symbian/pjlib/src/pj/os_core_symbian.cpp
===================================================================
--- /pjproject/branches/symbian/pjlib/src/pj/os_core_symbian.cpp	(revision 680)
+++ /pjproject/branches/symbian/pjlib/src/pj/os_core_symbian.cpp	(revision 681)
@@ -17,4 +17,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
  */
+
+//Auto-generated file. Please do not modify.
+#include <e32cmn.h>
+#pragma data_seg(".SYMBIAN")
+__EMULATOR_IMAGE_HEADER2 (0x10000079,0x1000008d,0x1000425b,EPriorityForeground,0x00000000u,0x00000000u,0x00000000,0x70000001,0x00000000,0)
+#pragma data_seg()
+
 
 #include <e32std.h>
@@ -200,4 +207,6 @@
     if (sleep(msec * 1000) == 0)
 	return PJ_SUCCESS;
+	
+    return PJ_SUCCESS;
 }
 
Index: /pjproject/branches/symbian/pjlib/src/pjlib-test/main_symbian.cpp
===================================================================
--- /pjproject/branches/symbian/pjlib/src/pjlib-test/main_symbian.cpp	(revision 680)
+++ /pjproject/branches/symbian/pjlib/src/pjlib-test/main_symbian.cpp	(revision 681)
@@ -1,2 +1,8 @@
+//Auto-generated file. Please do not modify.
+#include <e32cmn.h>
+#pragma data_seg(".SYMBIAN")
+__EMULATOR_IMAGE_HEADER2 (0x1000007a,0x00000000,0x00000000,EPriorityForeground,0x00000000u,0x00000000u,0x00000000,0x00000000,0x00000000,0)
+#pragma data_seg()
+
 #include "test.h"
 #include <pj/os.h>
@@ -26,5 +32,5 @@
     // add your program code here, example code below
     //
-    console->Write(_L("Hello, world!\n"));
+    test_main();
     }
 
