This is the mail archive of the cygwin 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: w32api/winnt.h BUILD Problem


"Patrick D. McAvoy" wrote:

> I am having a problem with BUILDing a fairly large C++ DLL using Cygwin
> under Eclipse. I am running Windows XP Media Edition. My Eclipse Project
> Name is: Analyzer_General

(Build is not an acronym, there's no need to shout.)

> My application source code seems to be compiling without errors, but two
> errors are reported from the w32api/winnt.h header.
> 
> I have attached the output from cygcheck to this message, as well as the
> console log from my BUILD. The full text of the two messages are:
> 
> Description:     Path
> Resource         Location          Creation Time  Id
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winnt.h error:
> extraneous `int' ignored
> Analyzer_General        line 182            1163443618484 652606
> 
> 
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winnt.h error:
> expected unqualified-id before ',' token                   Analyzer_General
> line 182            1163443618484 652605

It would be a lot easier if you included the actual g++ command output,
not whatever useless mangled version comes from your IDE.  From your
attachment, that is:

In file included from
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/windef.h:246,
                 from
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/windows.h:48,
                 from
C:/Eclipse_Workspace/Analyzer_General/ApplIncludes/analyzer/interface/include/RMAServerImpl.h:4,
                 from ../analyzer/interface/src/RMAServerImpl.cxx:20:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winnt.h: At
global scope:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winnt.h:182:
error: expected unqualified-id before ',' token
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winnt.h:182:
error: extraneous `int' ignored
make: *** [analyzer/interface/src/RMAServerImpl.o] Error 1

[ Note: you are using Windows paths and defining WIN32, all of which
implies that you are making a native Windows program.  You should be
using MinGW if this is your goal, not Cygwin.  But that's not relevant
to your question. ]

Line 182 of winnt.h is:

typedef BYTE BOOLEAN,*PBOOLEAN;

If it's choking on this typedef that means your namespace is polluted,
i.e. some other header or source file has already defined a type or a
macro named BOOLEAN prior to the point where the winnt.h header file is
included.  We would need to see your source code (or at the very least
the order of includes) to know anything more.  It would also be good to
look at the preprocessed source of the file, which helps debugging macro
namespace issues.  You might also be able to use WIN32_LEAN_AND_MEAN to
work around this but I don't recall what exactly it disables.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]