×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241

    error including vector

    Hi,
    I'm trying to include a vector from stl in my application.
    I did all changes from open c++ documentation to mmp file, using S60 SDK FP1 and Carbide.c++ 1.2
    When including the vector i get following compiler error:

    Code:
    In file included from /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/stlport/config/stl_gcce.h:202,
                     from /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/stlport/config/stlcomp.h:130,
                     from /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/stlport/stl/_config.h:75,
                     from /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/stlport/stl/_prolog.h:10,
                     from /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/stlport/vector:28,
    Code:
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:92: error: `__mbstate_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:97: error: `__size_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:116: error: `__wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:133: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:134: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:137: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:142: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:143: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:144: error: `mbstate_t' has not been declared
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:144: error: ISO C++ forbids declaration of `parameter' with no type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:146: error: `mbstate_t' has not been declared
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:146: error: ISO C++ forbids declaration of `parameter' with no type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:147: error: expected `,' or `...' before '*' token
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:147: error: ISO C++ forbids declaration of `mbstate_t' with no type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:149: error: `mbstate_t' has not been declared
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:149: error: ISO C++ forbids declaration of `parameter' with no type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:150: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:151: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:155: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:161: error: `mbstate_t' has not been declared
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:161: error: ISO C++ forbids declaration of `parameter' with no type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:178: error: `mbstate_t' has not been declared
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:178: error: ISO C++ forbids declaration of `parameter' with no type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:183: error: variable `wctob' definition is marked dllimport.
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:183: error: `wint_t' was not declared in this scope
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:217: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:218: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:219: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:220: error: `wint_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:258: error: `mbstate_t' has not been declared
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:258: error: ISO C++ forbids declaration of `parameter' with no type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:260: error: `mbstate_t' has not been declared
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:260: error: ISO C++ forbids declaration of `parameter' with no type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:339: error: variable `wfindnext' definition is marked dllimport.
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:339: error: `intptr_t' was not declared in this scope
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:339: error: expected primary-expression before "struct"
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:339: error: initializer expression list treated as compound expression
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:340: error: `intptr_t' does not name a type
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:341: error: variable `findclose' definition is marked dllimport.
    /Symbian/9.2/S60_3rd_FP1/EPOC32/include/stdapis/wchar.h:341: error: `intptr_t' was not declared in this scope
    Any idea, what can be wrong here? I searched quite a long time now, but i cant find anything. I also reinstalled the Plugin. Any advice would be very helpfull!

    Best regards,
    Andi

  2. #2
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241

    Re: error including vector

    The problems seems to be in the compiler Option:

    Code:
    OPTION CW -wchar_t on
    MACRO  _WCHAR_T_DECLARED
    Changing to:

    Code:
    OPTION GCCE -wchar_t on
    MACRO  _WCHAR_T_DECLARED
    brings following error:

    Code:
    arm-none-symbianelf-g++: on: No such file or directory
    arm-none-symbianelf-g++: unrecognized option `-wchar_t'
    Any solution? Are there tricks, how to use openC/C++ with carbide?

    Regards,
    Andi

  3. #3
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721

    Re: error including vector

    take a look in OpenC++ document in SDK the article:
    'Examples for Standard C++ Libraries'

    check your MMP out.
    Symbian && Android && iPhoneOS

  4. #4
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241

    Re: error including vector

    As i told in the first post, i did all the changes from the documentation to my mmp file.

    Code:
    SYSTEMINCLUDE   \epoc32\include
    SYSTEMINCLUDE   \epoc32\include\libc
    SYSTEMINCLUDE   \epoc32\include\ecom
    SYSTEMINCLUDE	\epoc32\include\stdapis
    SYSTEMINCLUDE	\epoc32\include\stdapis\sys
    SYSTEMINCLUDE	\epoc32\include\stdapis\stlport\stl
    SYSTEMINCLUDE	\epoc32\include\stdapis\stlport\
    
    LIBRARY		libstdcpp.lib
    LIBRARY		libc.lib
    LIBRARY		libpthread.lib
    LIBRARY         euser.lib
    
    OPTION CW -wchar_t on
    MACRO  _WCHAR_T_DECLARED
    i wont need static library libcrt0.lib because i'm not using main()

    Looks like this is not causing the problem

    Regards,
    Andi

  5. #5
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241

    Re: error including vector

    Problem seems to be solved by not using the libc includes.
    Looks like there was included a wrong file!

    Thanks and Regards,
    Andi

  6. #6
    Registered User
    Join Date
    Apr 2008
    Location
    Germany
    Posts
    11

    Re: error including vector

    i guess because the wchar.h is included multiple times where the the declaration of e.g. _MBSTATE_T_DECLARED, ..WINT..,and so on defined.
    I have the same problem so I listed all my files which have wchar.h included and avoid the duplicated wchar.h mutiple times and this solve the problem. Wierd though.

    Besides, one more point, the file "wchar.h" is part of stdapis, stlport and stlport/cstd.
    If you include both stlport and stdapis as include path in your mmp, you may run into a problem.



    Pattreeya.
    Last edited by pattreeya; 2009-04-06 at 16:51. Reason: problem solved.

Similar Threads

  1. Vector Problems
    By Tiger79 in forum Mobile Java General
    Replies: 9
    Last Post: 2008-04-22, 14:03
  2. Transfering a Vector over HTTP
    By mobilekid in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2008-03-11, 02:12
  3. Array And Vector in C++
    By saeidkhan in forum Symbian
    Replies: 5
    Last Post: 2006-05-01, 06:13
  4. RMS v. Vector
    By kevin1964 in forum Mobile Java General
    Replies: 0
    Last Post: 2004-11-16, 17:56

Posting Permissions

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