This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Invalid compiler error

I made the change you suggested and that fixed the problem. I will let the implementor of the library know about this, as its obviously a bug.

I have never encountered this kind of syntax before where the #elif is used without a defined, so I didn't know how valid it was. It seems in some circumstances it might work, and in others it won't. Probably best to avoid it since it is unreliable.

Thank you.

Robert Collins wrote:

On Fri, 2003-03-21 at 08:01, Tron Thomas wrote:

I'm sorry. I misread what you wrote. I thought you were suggesting that I try the #elif directive in simple coding example to see if the compiler would accept it. This is was I used:

This program compiles just fine, and if I define the proper value, it print the expected text. So it looks like the #elif directive, in general, is compatable with the Cygwin compiler. It doesn't explain why the error message still occurs. I suppose I could try changing the code to what you actually suggested and see if that works.

IIRC the elif directive requires the define to be, well, defined.

the error you got suggests to me that
#elif defined(_WIN32)

would be a better test.


-- Unsubscribe info: Bug reporting: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]