Error "type specifier omitted for parameter" in preprocessor directives??

Discussion in 'C++' started by eminemence@gmail.com, Jan 24, 2006.

  1. Guest

    Hi,
    I have been trying to get STLPort work for Symbian.
    I am using CodeWarrior compiler and it spews this errors namely
    *************************************************************************
    Error : type specifier omitted for parameter
    string.h line 30
    ************************************************************************
    The following is the line where I get this error:
    Line 30 : # if (_STLP_OUTERMOST_HEADER_ID == 0x269)
    Line 31 : # include <stl/_epilog.h>
    Line 32 : # undef _STLP_OUTERMOST_HEADER_ID
    Line 33 : # endif

    Can somebody please help me in getting this fixed.
    --eminemence.
    , Jan 24, 2006
    #1
    1. Advertising

  2. mlimber Guest

    wrote:
    > Hi,
    > I have been trying to get STLPort work for Symbian.
    > I am using CodeWarrior compiler and it spews this errors namely
    > *************************************************************************
    > Error : type specifier omitted for parameter
    > string.h line 30
    > ************************************************************************
    > The following is the line where I get this error:
    > Line 30 : # if (_STLP_OUTERMOST_HEADER_ID == 0x269)
    > Line 31 : # include <stl/_epilog.h>
    > Line 32 : # undef _STLP_OUTERMOST_HEADER_ID
    > Line 33 : # endif
    >
    > Can somebody please help me in getting this fixed.
    > --eminemence.


    What is _STLP_OUTERMOST_HEADER_ID defined as?

    Cheers! --M
    mlimber, Jan 24, 2006
    #2
    1. Advertising

  3. eminemence Guest

    Its a simple #define noting else!!
    eminemence, Jan 24, 2006
    #3
  4. Re: Error "type specifier omitted for parameter" in preprocessordirectives??

    wrote:
    > I have been trying to get STLPort work for Symbian.
    > I am using CodeWarrior compiler and it spews this errors namely
    > *************************************************************************
    > Error : type specifier omitted for parameter
    > string.h line 30
    > ************************************************************************
    > The following is the line where I get this error:
    > Line 30 : # if (_STLP_OUTERMOST_HEADER_ID == 0x269)
    > Line 31 : # include <stl/_epilog.h>
    > Line 32 : # undef _STLP_OUTERMOST_HEADER_ID
    > Line 33 : # endif
    >
    > Can somebody please help me in getting this fixed.


    Please go to

    http://www.stlport.com/cgi-bin/forum/dcboard.cgi

    STLport has its own forum, they can help you.

    As to the code you posted, there is nothing in it to warrant that error
    message.

    V
    Victor Bazarov, Jan 24, 2006
    #4
  5. Howard Guest

    <> wrote in message
    news:...
    > Hi,
    > I have been trying to get STLPort work for Symbian.
    > I am using CodeWarrior compiler and it spews this errors namely
    > *************************************************************************
    > Error : type specifier omitted for parameter
    > string.h line 30
    > ************************************************************************
    > The following is the line where I get this error:
    > Line 30 : # if (_STLP_OUTERMOST_HEADER_ID == 0x269)
    > Line 31 : # include <stl/_epilog.h>
    > Line 32 : # undef _STLP_OUTERMOST_HEADER_ID
    > Line 33 : # endif
    >
    > Can somebody please help me in getting this fixed.
    > --eminemence.
    >


    If that's the actual code, then the problem is probably the spaces after the
    # symbol. For example, instead of "# if", it should be #if". I'm not sure
    if that's in the standard anywhere, but my compilers sure won't accept those
    with spaces after the # symbol. If you want to indent, indent the # as
    well, and you'll be fine. Try this:

    #if (_STLP_OUTERMOST_HEADER_ID == 0x269)
    #include <stl/_epilog.h>
    #undef _STLP_OUTERMOST_HEADER_ID
    #endif

    -Howard

    -Howard
    Howard, Jan 24, 2006
    #5
  6. Marcus Kwok Guest

    Howard <> wrote:
    >
    > <> wrote in message
    >> Line 30 : # if (_STLP_OUTERMOST_HEADER_ID == 0x269)
    >> Line 31 : # include <stl/_epilog.h>
    >> Line 32 : # undef _STLP_OUTERMOST_HEADER_ID
    >> Line 33 : # endif

    >
    > If that's the actual code, then the problem is probably the spaces after the
    > # symbol. For example, instead of "# if", it should be #if". I'm not sure
    > if that's in the standard anywhere, but my compilers sure won't accept those
    > with spaces after the # symbol. If you want to indent, indent the # as
    > well, and you'll be fine. Try this:
    >
    > #if (_STLP_OUTERMOST_HEADER_ID == 0x269)
    > #include <stl/_epilog.h>
    > #undef _STLP_OUTERMOST_HEADER_ID
    > #endif


    I thought the '#' had to be in the first column?

    --
    Marcus Kwok
    Marcus Kwok, Jan 24, 2006
    #6
  7. JustBoo Guest

    On Tue, 24 Jan 2006 18:43:15 +0000 (UTC),
    (Marcus Kwok) wrote:

    >> #if (_STLP_OUTERMOST_HEADER_ID == 0x269)
    >> #include <stl/_epilog.h>
    >> #undef _STLP_OUTERMOST_HEADER_ID
    >> #endif

    >
    >I thought the '#' had to be in the first column?


    That's interesting. In my compiler I can do this:

    # define BOO
    # define BOO 69

    Those are spaces where the white space is and it complies both
    without errors or warnings. That surprised me. Is there a rule for
    this?
    JustBoo, Jan 24, 2006
    #7
  8. Re: Error "type specifier omitted for parameter" in preprocessordirectives??

    Marcus Kwok wrote:
    > Howard <> wrote:
    >
    >><> wrote in message
    >>
    >>>Line 30 : # if (_STLP_OUTERMOST_HEADER_ID == 0x269)
    >>>Line 31 : # include <stl/_epilog.h>
    >>>Line 32 : # undef _STLP_OUTERMOST_HEADER_ID
    >>>Line 33 : # endif

    >>
    >>If that's the actual code, then the problem is probably the spaces after the
    >># symbol. For example, instead of "# if", it should be #if". I'm not sure
    >>if that's in the standard anywhere, but my compilers sure won't accept those
    >>with spaces after the # symbol. If you want to indent, indent the # as
    >>well, and you'll be fine. Try this:
    >>
    >>#if (_STLP_OUTERMOST_HEADER_ID == 0x269)
    >> #include <stl/_epilog.h>
    >> #undef _STLP_OUTERMOST_HEADER_ID
    >>#endif

    >
    >
    > I thought the '#' had to be in the first column?


    Are you asking? We don't know what you thought. The '#' has to be the
    first non-whitespace character on the line.

    V
    Victor Bazarov, Jan 24, 2006
    #8
  9. eminemence Guest

    I have done all the things like a space before '#' and after '#' but it
    doesn't matter the compiler doesn't care.
    Anyway the errors gone after the proper files had been included.
    --eminemence.
    eminemence, Jan 25, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    2,667
  2. Nalla
    Replies:
    25
    Views:
    877
    MikeyD
    Oct 8, 2003
  3. seemanta dutta

    how to make elegant use of preprocessor directives

    seemanta dutta, Nov 27, 2003, in forum: C Programming
    Replies:
    13
    Views:
    635
    Randy Howard
    Dec 1, 2003
  4. IndyChris
    Replies:
    1
    Views:
    8,827
    bruce barker \(sqlwork.com\)
    Aug 9, 2006
  5. Theon Greyjoy

    Preprocessor directives in codebehind file

    Theon Greyjoy, Oct 6, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,520
    bruce barker \(sqlwork.com\)
    Oct 6, 2006
Loading...

Share This Page