G'Day,
I'm having trouble building my 1st example file from the tutorial "SimpleEx" in Wileys "Developing Software for Symbian OS".
Obviously, I'm fairly new to developing for Symbian - my goal is an app for my 6700 Slide (3rd edition FP2)
I'm using:
- Win XP
- ActivePerl-5.6.1.635-MSWin32-x86.msi
- S60_3rd_Edition_SDK_Feature_Pack_2_v1_1_en.zip
- Carbide_cpp_v2_7_en.exe
- Java 6.23
Both command line and carbine building report error. The curious thing is, most/all of them point to the curly brackets *confused* :
Code:/*===================== File: SimpleEx.cpp =====================*/ #include <eikstart.h> #include "SimpleEx.h" // Create application object, return a pointer to it EXPORT_C CApaApplication* NewApplication() { return (static_cast<CApaApplication*>(new CSimpleExApplication)); } GLDEF_C TInt E32Main() { return EikStart::RunApplication( NewApplication ); }Code:/*========================================================== File: SimpleEx_App.cpp This file contains the application class for SimpleEx. ==========================================================*/ #include "SimpleEx.h" CApaDocument* CSimpleExApplication::CreateDocumentL() { return new(ELeave) CSimpleExDocument(*this); } TUid CSimpleExApplication::AppDllUid() const { return KUidSimpleExApp; }Code:/*=============================================================== File: SimpleEx_View.cpp This file contains the application view class for SimpleEx. ===============================================================*/ #include "eikenv.h" #include <coemain.h> #include "SimpleEx.h" CSimpleExAppView* CSimpleExAppView::NewL(const TRect& aRect) { CSimpleExAppView* self = CSimpleExAppView::NewLC(aRect); CleanupStack::Pop(self); return self; } CSimpleExAppView* CSimpleExAppView::NewLC(const TRect& aRect) { CSimpleExAppView* self = new (ELeave) CSimpleExAppView; CleanupSTack::PushL(self); self->ConstructL(aRect); return self; } void CSimpleExAppView::ConstructL(const TRect& aRect) { CreateWindowL(); SetRect(aRect); ActivateL(); } void CSimpleExAppView::Draw(const TRect& ) const { CWindowGc& gc = SystemGc(); TRect drawRect = Rect(); gc.Clear(); const CFont* font = iEikonEnv->TitleFont(); gc.UseFont(font); TInt baselineOffset=(drawRect.Height() - font->HeightInPixels())/2; gc.DrawText(_L("Simple Example"),drawRect,baselineOffset,CGraphicsContext::ECenter, 0); gc.DiscardFont(); }Code:/*================================================================= File: SimpleEx_UI.cpp This file contains the application UI class for S60 SimpleEx. =================================================================*/ #include "SimpleEx.h" void CSimpleExAppUi::ConstructL() { BaseConstructL(CAknEnableSkin); iAppView = CSimpleExAppView::NewL(ClientRect()); } CSimpleExAppUi::~CSimpleExAppUi() { delete iAppView; } void CSimpleExAppUi::HandleCommandL(TInt aCommand) { case EEikCmdExt: case EAknSoftKeyExit: Exit(); break; case ESimpleExCommand: { _LIT(KMessage,"Start Selected!"); iEikonEnv->AlertWin(KMessage); break; } }I hope you can point me in the right direction -Code:Creation Time Description Resource Path Location Type 1296391666968 illegal access/using declaration SimpleEx_App.cpp /SimpleEx/src line 7 C/C++ Problem 1296391666969 illegal access/using declaration SimpleEx_App.cpp /SimpleEx/src line 11 C/C++ Problem 1296391666970 declaration syntax error SimpleEx_App.cpp /SimpleEx/src line 14 C/C++ Problem 1296391666971 declaration syntax error SimpleEx.cpp /SimpleEx/src line 15 C/C++ Problem 1296391666972 illegal access/using declaration SimpleEx_View.cpp /SimpleEx/src line 9 C/C++ Problem 1296391666973 illegal access/using declaration SimpleEx_View.cpp /SimpleEx/src line 15 C/C++ Problem 1296391666974 illegal access/using declaration SimpleEx_View.cpp /SimpleEx/src line 22 C/C++ Problem 1296391666975 illegal access/using declaration SimpleEx_View.cpp /SimpleEx/src line 28 C/C++ Problem 1296391666976 declaration syntax error SimpleEx_View.cpp /SimpleEx/src line 38 C/C++ Problem 1296391666977 illegal access/using declaration SimpleEx_UI.cpp /SimpleEx/src line 7 C/C++ Problem 1296391666978 declaration syntax error SimpleEx_UI.cpp /SimpleEx/src line 11 C/C++ Problem 1296391666980 declaration syntax error SimpleEx_UI.cpp /SimpleEx/src line 27 C/C++ Problem 1296391666979 illegal access/using declaration SimpleEx_UI.cpp /SimpleEx/src line 16 C/C++ Problem
I double checked the writings in the book and everything looks exactly like -
Thanks in advance!
B.

Reply With Quote
), tried building it in command line and tried carbine after importing.



