×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Regular Contributor
    Join Date
    May 2003
    Posts
    96

    Declaration syntax error e32const.h line 2636

    Hello guys,
    I’ve recently moved to CodeWarrior.
    I am building a DLL using SDK 3.0.
    The DLL compiles and works in the emulator but if I rebuild it including another application .c file, I get this error, apparently from the library:

    Error: declaration syntax error
    E32const.h line 2636

    Which refers to:
    typedef TInt (*TLibraryEntry)(TInt);

    For some reason I am prone to believe that is quite a silly problem due to some configuration error…
    Does anyone have any suggestion?

    THX,
    Mik

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

    Re: Declaration syntax error e32const.h line 2636

    Have you modified your e32const.h? In mine, TLibraryEntry is in the 2619th line, and line 2636 is TExceptionHandler.

  3. #3
    Regular Contributor
    Join Date
    May 2003
    Posts
    96

    Re: Declaration syntax error e32const.h line 2636

    weird...
    No I didn't modify it and indeed it has the same date & time of other headers (31.10.2005).
    Are you using the same version?
    Mine is Symbian 9.1, S60 3rd.

  4. #4
    Regular Contributor
    Join Date
    May 2003
    Posts
    96

    Re: Declaration syntax error e32const.h line 2636

    SORRY !
    I've mistaken the line, you were right: the line is 2636
    and is:
    typedef void (*TExceptionHandler)(TExcType);

    Anyway it is just the first error in the same file...
    Then I get many others (following output is from command line, but it sthe same in codewarrior):

    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32const.h:2636: declaration syntax error
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32const.h:2636: (included from:
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32const.h:2636: C:\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:8
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32const.h:2636: C:\Symbian\9.1\S60_3rd\EPOC32\include\e32std.h:13
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32const.h:2636: C:\projects2006\CB19HZ\src\Platform\Symbian9\ptypes.h:18
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32const.h:2636: C:\projects2006\CB19HZ\src\AOI\Conf\CB1_Protocol\CB1_Protocol.h:26
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32const.h:2636: C:\projects2006\CB19HZ\src\AOI\API\GPS_DSP_Conf.h:25
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32const.h:2636: C:\projects2006\CB19HZ\src\AOI\Conf\Config_Manager\CFM_api.h:51
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32const.h:2636: C:\projects2006\CB19HZ\src\AOI\Conf\Config_Manager\CFM_api.c:21)
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:10: declaration syntax error
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:10: (included from:
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:10: C:\Symbian\9.1\S60_3rd\EPOC32\include\e32std.h:13
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:10: C:\projects2006\CB19HZ\src\Platform\Symbian9\ptypes.h:18
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:10: C:\projects2006\CB19HZ\src\AOI\Conf\CB1_Protocol\CB1_Protocol.h:26
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:10: C:\projects2006\CB19HZ\src\AOI\API\GPS_DSP_Conf.h:25
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:10: C:\projects2006\CB19HZ\src\AOI\Conf\Config_Manager\CFM_api.h:51
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:10: C:\projects2006\CB19HZ\src\AOI\Conf\Config_Manager\CFM_api.c:21)
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:92: declaration syntax error
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:92: (included from:
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:92: C:\Symbian\9.1\S60_3rd\EPOC32\include\e32std.h:13
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:92: C:\projects2006\CB19HZ\src\Platform\Symbian9\ptypes.h:18
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:92: C:\projects2006\CB19HZ\src\AOI\Conf\CB1_Protocol\CB1_Protocol.h:26
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:92: C:\projects2006\CB19HZ\src\AOI\API\GPS_DSP_Conf.h:25
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:92: C:\projects2006\CB19HZ\src\AOI\Conf\Config_Manager\CFM_api.h:51
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:92: C:\projects2006\CB19HZ\src\AOI\Conf\Config_Manager\CFM_api.c:21)
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:98: declaration syntax error
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:98: (included from:
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:98: C:\Symbian\9.1\S60_3rd\EPOC32\include\e32std.h:13
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:98: C:\projects2006\CB19HZ\src\Platform\Symbian9\ptypes.h:18
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:98: C:\projects2006\CB19HZ\src\AOI\Conf\CB1_Protocol\CB1_Protocol.h:26
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:98: C:\projects2006\CB19HZ\src\AOI\API\GPS_DSP_Conf.h:25
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:98: C:\projects2006\CB19HZ\src\AOI\Conf\Config_Manager\CFM_api.h:51
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:98: C:\projects2006\CB19HZ\src\AOI\Conf\Config_Manager\CFM_api.c:21)
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:147: declaration syntax error
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:147: (included from:
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:147: C:\Symbian\9.1\S60_3rd\EPOC32\include\e32std.h:13
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:147: C:\projects2006\CB19HZ\src\Platform\Symbian9\ptypes.h:18
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:147: C:\projects2006\CB19HZ\src\AOI\Conf\CB1_Protocol\CB1_Protocol.h:26
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:147: C:\projects2006\CB19HZ\src\AOI\API\GPS_DSP_Conf.h:25
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:147: C:\projects2006\CB19HZ\src\AOI\Conf\Config_Manager\CFM_api.h:51
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:147: C:\projects2006\CB19HZ\src\AOI\Conf\Config_Manager\CFM_api.c:21)
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:204: declaration syntax error
    ..\..\Symbian\9.1\S60_3rd\EPOC32\include\e32cmn.h:204: (included from:

    Thanks,
    Mik

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,752

    Re: Declaration syntax error e32const.h line 2636

    I am not sure, but these weird things can happen when you forget ';' at the end of some type declarations (class, enum, etc.). Check the end of your ptypes.h, CB1_Protocol.h, GPS_DSP_Conf.h and CFM_api.h. If everything seems to be ok, also check the end of the file you include just before CFM_api.h in CFM_api.c.
    Maybe it helps.

  6. #6
    Regular Contributor
    Join Date
    May 2003
    Posts
    96

    Re: Declaration syntax error e32const.h line 2636

    Thank you for pointing me to the right direction where to look at.
    In one of these include files I discovered that the following line is the cause of that weird error:

    typedef void (*pf_NoRet_U32Arg) (TUint32);

    Honestly I don't understand why, but at the moment I can live without...
    Thanks,
    Mik

  7. #7
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Declaration syntax error e32const.h line 2636

    The key to this is that you are trying to include a C++ header file when building as a C unit of compilation.

    You will need to edit gcce.mk and change the C_LANG_OPTION to "-x c++" from "-x c"

    This forces GCCE to compile the c code as c++

  8. #8
    Regular Contributor
    Join Date
    May 2003
    Posts
    96

    Re: Declaration syntax error e32const.h line 2636

    Thank you very much!
    that was indeed...
    you changed my day
    Thanks,
    mik

  9. #9
    Regular Contributor
    Join Date
    May 2003
    Posts
    96

    Re: Declaration syntax error e32const.h line 2636

    Doing the suggested change in gcce.mk fixes the problem for target compliation.
    Does anyone know how to fix the same in CodeWarrior for emulator compilation?

    Thanks,
    Mik

  10. #10
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Declaration syntax error e32const.h line 2636

    To be honest we hav'nt seen in it Codewarrior 3.1 compilation

  11. #11
    Registered User
    Join Date
    Aug 2006
    Posts
    46

    Re: Declaration syntax error e32const.h line 2636

    in my case it was
    #include e32cmn.h
    in one of the .c files.
    under GCCE it needs it to find memset function ,but under emulator it creates described problem.
    ive chenged it to
    #ifdef __GCCE__
    #include e32cmn.h
    #endif
    and now it works fine both ways.

Similar Threads

  1. problem with Code Warrior 5.2
    By mayankkedia in forum Symbian
    Replies: 4
    Last Post: 2006-06-22, 08:26
  2. My BuilderX (with S60 SDK 2.1.NET MS version) cannot build ARMI UREL
    By danielvidonyi@hotmail.com in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-05-04, 21:30
  3. code warrior problems
    By mayankkedia in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2004-10-25, 06:59
  4. problem with codewarrior 5.2
    By mayankkedia in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2004-09-27, 16:08
  5. Cannot compile SDK's examples for 7650 platform...
    By midletsoft in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2003-08-12, 19:11

Posting Permissions

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