×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jun 2008
    Location
    Vantaa, Finland
    Posts
    14

    Question error: expected class-name before '{' token

    Could you help me with following problem?

    Severity and Description Path Resource Location Creation Time Id
    error: expected class-name before '{' token ToDoRepeatMobile/inc ToDoRepeatMobileAppUi.h line 31 1215432969890 331
    unused variable 'ret' ToDoRepeatMobile/src ToDoRepeatMobileAppUi.cpp line 123 1215432969890 332

    .h:
    Code:
    //----------------------------------------------------------------------------------
    // http://wiki.forum.nokia.com/index.php/Forms_in_Symbian_c%2B%2B#Header_File
    // Derive the class from CAknForm
    //---------------------------------------------------------------------------------- 
    class CTodoForm : public CAknForm {
    
        public:  // Constructor and destructor  
            static CTodoForm* NewL();	// NewL: Two-phased constructor.
            virtual ~CTodoForm();	// ~CTodoForm: Destructor.
        public:
            // From CAknForm, ExecuteLD
            // @return CAknForm::ExecuteLD return value
            // @param aResourceId resource ID
            TInt ExecuteLD( TInt aResourceId ); 
     
            // From CAknForm, PrepareLC
            // @param aResourceId resource ID
            void PrepareLC( TInt aResourceId ); 
     
        private:  // Constructor
            /**
            * CTodoForm
            * Default constructor.
            */
            CTodoForm();
     
            /**
            * ConstructL
            * Second-phase constructor.
            */
            void ConstructL();
        
        private:  // Functions from base class
            /**
            * From CEikDialog, PostLayoutDynInitL 
            * Set default field value to member data.
            */
            void PreLayoutDynInitL();
     
            /**
            * From CAknForm , QuerySaveChangesL
            * Show save query. If user answers "No" to this query.
            * return field value to the value which is before editing.
            */
            TBool QuerySaveChangesL();
     
            /**
            * From CAknForm , SaveFormDataL
            * Save the contents of the form.
            */
            TBool SaveFormDataL(); 
     
            /**
            * From CAknForm, DoNotSaveFormDataL
            * Does not save the contents of the form.
            */
            void DoNotSaveFormDataL();
     };
    Console:

    ***Building project "ToDoRepeatMobile" for configuration "Phone Release (GCCE) [S60_3rd_MR]"

    ***Printing environment variables modified from default:
    PATH=H:\software\Symbian\9.1\S60_3rd_MR\epoc32\tools;H:\software\Symbian\9.1\S60_3rd_MR\epoc32\gcc\bin;H:\software\carbide\jre\bin\client;H:\software\carbide\jre\bin;H:\software\ActivePerl\bin\;G:\Program Files\Common Files\Symbian\Tools;H:\software\ActivePerl\site\bin;H:\software\ActivePerl\bin;G:\Program Files\PC Connectivity Solution\;G:\WINDOWS\system32;G:\WINDOWS;G:\WINDOWS\System32\Wbem;H:\software\mysql_server\bin;H:\software\QuickTime\QTSystem\;H:\software\CSL Arm Toolchain\bin;
    EPOCROOT=\software\Symbian\9.1\S60_3rd_MR\
    NO_DEPENDENCIES=-nd
    MAKE=make -j 4

    Working Directory: H:/h4x/symbian/workspace/ToDoRepeatMobile/group

    ***Makefile structures up to date. Skipping 'bldmake bldfiles'

    ***Invoking abld command
    perl.exe -S ABLD.PL \h4x\symbian\workspace\ToDoRepeatMobile\group\ export
    make -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\EXPORT.make" EXPORT VERBOSE=-s
    Nothing to do

    Total Time: 0 sec

    ***Generating abld makefile.

    ***Invoking abld command
    perl.exe -S ABLD.PL \h4x\symbian\workspace\ToDoRepeatMobile\group\ makefile gcce Icons_scalable_dc
    make -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\GCCE.make" MAKEFILEICONS_SCALABLE_DC VERBOSE=-s
    make -j 4 -s -C \h4x\symbian\workspace\ToDoRepeatMobile\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..\..\..\..\h4x\symbian\workspace\ToDoRepeatMobile\group PLATFORM=GCCE MAKMAKE

    Total Time: 0 sec

    ***Generating abld makefile.

    ***Invoking abld command
    perl.exe -S ABLD.PL \h4x\symbian\workspace\ToDoRepeatMobile\group\ makefile gcce build_help
    make -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\GCCE.make" MAKEFILEBUILD_HELP VERBOSE=-s
    make -j 4 -s -C \h4x\symbian\workspace\ToDoRepeatMobile\HELP -f "BUILD_HELP.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\BUILD_HELP\GCCE TO_BLDINF=..\..\..\..\..\h4x\symbian\workspace\ToDoRepeatMobile\group PLATFORM=GCCE MAKMAKE

    Total Time: 0 sec

    ***Invoking abld command
    perl.exe -S ABLD.PL \h4x\symbian\workspace\ToDoRepeatMobile\group\ library gcce
    make -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\GCCE.make" LIBRARY VERBOSE=-s
    make -s -C \h4x\symbian\workspace\ToDoRepeatMobile\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..\..\..\..\h4x\symbian\workspace\ToDoRepeatMobile\group PLATFORM=GCCE LIB
    make -s -C \h4x\symbian\workspace\ToDoRepeatMobile\HELP -f "BUILD_HELP.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\BUILD_HELP\GCCE TO_BLDINF=..\..\..\..\..\h4x\symbian\workspace\ToDoRepeatMobile\group PLATFORM=GCCE LIB
    make -s -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\TODOREPEATMOBILE\GCCE\TODOREPEATMOBILE.GCCE" LIBRARY

    Total Time: 1 sec

    ***Invoking abld command
    perl.exe -S ABLD.PL \h4x\symbian\workspace\ToDoRepeatMobile\group\ resource gcce urel
    make -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\GCCE.make" RESOURCE CFG=UREL VERBOSE=-s
    make -s -C \h4x\symbian\workspace\ToDoRepeatMobile\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..\..\..\..\h4x\symbian\workspace\ToDoRepeatMobile\group PLATFORM=GCCE CFG=UREL RESOURCE
    make -s -C \h4x\symbian\workspace\ToDoRepeatMobile\HELP -f "BUILD_HELP.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\BUILD_HELP\GCCE TO_BLDINF=..\..\..\..\..\h4x\symbian\workspace\ToDoRepeatMobile\group PLATFORM=GCCE CFG=UREL RESOURCE
    make -s -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\TODOREPEATMOBILE\GCCE\TODOREPEATMOBILE.GCCE" RESOURCEUREL

    Total Time: 1 sec

    ***Invoking abld command
    perl.exe -S ABLD.PL \h4x\symbian\workspace\ToDoRepeatMobile\group\ target gcce urel
    make -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\GCCE.make" TARGET CFG=UREL VERBOSE=-s
    In file included from ..\\src\\Todorepeatmobiledocument.cpp:11:
    ..//inc/ToDoRepeatMobileAppUi.h:31: error: expected class-name before '{' token
    make[1]: *** [..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\TODOREPEATMOBILE\GCCE\UREL\ToDoRepeatMobileDocument.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    ..\\src\\Todorepeatmobileappui.cpp: In member function `virtual void CToDoRepeatMobileAppUi::HandleCommandL(TInt)':
    ..\\src\\Todorepeatmobileappui.cpp:123: warning: unused variable 'ret'
    make[1]: *** Waiting for unfinished jobs....
    make: *** [TARGETTODOREPEATMOBILE] Error 2
    make -j 4 -s -C \h4x\symbian\workspace\ToDoRepeatMobile\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..\..\..\..\h4x\symbian\workspace\ToDoRepeatMobile\group PLATFORM=GCCE CFG=UREL BLD
    make -j 4 -s -C \h4x\symbian\workspace\ToDoRepeatMobile\HELP -f "BUILD_HELP.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\BUILD_HELP\GCCE TO_BLDINF=..\..\..\..\..\h4x\symbian\workspace\ToDoRepeatMobile\group PLATFORM=GCCE CFG=UREL BLD
    make -j 4 -s -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\TODOREPEATMOBILE\GCCE\TODOREPEATMOBILE.GCCE" UREL
    Todorepeatmobileappui.cpp
    Todorepeatmobiledocument.cpp

    Total Time: 3 sec

    ***Invoking abld command
    perl.exe -S ABLD.PL \h4x\symbian\workspace\ToDoRepeatMobile\group\ final gcce urel
    make -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\GCCE.make" FINAL CFG=UREL VERBOSE=-s
    make -j 4 -s -C \h4x\symbian\workspace\ToDoRepeatMobile\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..\..\..\..\h4x\symbian\workspace\ToDoRepeatMobile\group PLATFORM=GCCE CFG=UREL FINAL
    make -j 4 -s -C \h4x\symbian\workspace\ToDoRepeatMobile\HELP -f "BUILD_HELP.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\BUILD_HELP\GCCE TO_BLDINF=..\..\..\..\..\h4x\symbian\workspace\ToDoRepeatMobile\group PLATFORM=GCCE CFG=UREL FINAL

    ***Invoking abld command
    perl.exe -S ABLD.PL \h4x\symbian\workspace\ToDoRepeatMobile\group\ test export
    make -r -f "\software\Symbian\9.1\S60_3rd_MR\EPOC32\BUILD\h4x\symbian\workspace\ToDoRepeatMobile\group\EXPORTtest.make" EXPORT VERBOSE=-s
    Nothing to do

    ***Errors were detected in build. See the Problems or Console view for details.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,696

    Re: error: expected class-name before '{' token

    Quote Originally Posted by tubelius View Post
    Could you help me with following problem?

    Severity and Description Path Resource Location Creation Time Id
    error: expected class-name before '{' token ToDoRepeatMobile/inc ToDoRepeatMobileAppUi.h line 31 1215432969890 331
    unused variable 'ret' ToDoRepeatMobile/src ToDoRepeatMobileAppUi.cpp line 123 1215432969890 332
    Feel free to locate the 31st line of ToDoRepeatMobileAppUi.h - you can actually do that with a double-click. Then fix the error. Your post contains partial code, this way it would be hard to find out which is the 31st line.
    You probably do not refer a variable called ret, but do not care about that - I do not care neither.

  3. #3
    Registered User
    Join Date
    Jun 2008
    Location
    Vantaa, Finland
    Posts
    14

    Re: error: expected class-name before '{' token

    Right.

    The actual problem is this:

    Severity and Description Path Resource Location Creation Time Id
    error: expected class-name before '{' token ToDoRepeatMobile/inc ToDoRepeatMobileAppUi.h line 31 1215432969890 331

    It refers to this line: "class CTodoForm : public CAknForm {". I don't get what's wrong with it, looks fine to me.

  4. #4
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: error: expected class-name before '{' token

    The compiler does not know that CAknForm is a class name. You need to include the full declaration of CAknForm first:
    Code:
    #include <aknform.h>
    Lauri

  5. #5
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: error: expected class-name before '{' token

    Another alternative would be: just make a foreward declartaion of this class in ur header file and include that header whereever u want to implement.


    thanks

  6. #6
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: error: expected class-name before '{' token

    Forward declaration won't help since the original poster is deriving from CAknForm, not just declaring pointers or references to it.

    Lauri

  7. #7
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Smile Re: error: expected class-name before '{' token

    oops that is a mistake.....

    anyway thanks

Similar Threads

  1. External Linking Error (Undefined Symbol)
    By nile_mail in forum Symbian
    Replies: 2
    Last Post: 2008-08-05, 13:10
  2. Any simple example using SIP Stack?
    By kkoon50 in forum Symbian
    Replies: 35
    Last Post: 2007-04-18, 08:32
  3. How to set number for forwarding??
    By silviuccia in forum Symbian
    Replies: 6
    Last Post: 2007-01-09, 10:16
  4. Replies: 0
    Last Post: 2003-12-07, 16:06
  5. Exceptions while loading application
    By avinash_rs in forum Mobile Java General
    Replies: 0
    Last Post: 2003-06-09, 10:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×