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

E

eminemence

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.
 
M

mlimber

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
 
V

Victor Bazarov

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
 
H

Howard

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
 
M

Marcus Kwok

Howard said:
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?
 
J

JustBoo

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?
 
V

Victor Bazarov

Marcus said:
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
 
E

eminemence

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top