This is the mail archive of the cygwin@cygwin.com 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'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:

#include <iostream>
int main()
{
   using std::cout;

#if FOO
   cout << "Foo\n";

#elif BAR
   cout << "Bar\n"
#endif

   return 0;
}

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.

Max Bowsher wrote:

Tron Thomas wrote:


Earlier, I tried almost exactly what you suggested before posting my
question, and it worked fine with the Cygwin compiler. Would it be
helpful if I actually provided the headers the library is using?



No. It seems you have discovered you were using a non-portable construct.


Now you know how to re-write it.

Problem solved, yes?

Max.







-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


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