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

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?

Max Bowsher wrote:

Tron Thomas wrote:

I wrote a simple program to test an open source library I am planning to
use in a development project.  I want the project to be supported on
different compilers, including the GCC compiler included with Cygwin.  I
have been able to successfully build my test application using the
Micrsoft and Borland compilers.  When I try to build the program with
the Cygwin compiler, I get a compiler error related to a header file I'm
including from the library.

Here is the error message I get:

#if with no expression

This is the line of code that is apparently causing the problem:

#elif _WIN32

I don't see why this should be causing a problem especially when the
other compilers build without any problems. I use -DWIN32 in the
command line arguments I used when I build the application.

Hmm. Is #elif a valid directive for gcc? I don't know. You could always rewrite like:

#if FOO

#if BAR



-- 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]