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

On 13 November 2006 22:23, Brian Dessent wrote:

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

  The first thing to do is try rebuilding the file and looking at the
preprocessed output.  Cut and paste the build command from the log file and
add the '--save-temps -dD -E' options, remove the -c, -o and -M options, then
look at Analyzer.ii, which should have been created.  Find out what line 182
of winnt.h is getting translated to, and then search back up in the file to
find out where the #define is coming from. 

  Here's what your command line will need to look like, sorry about how badly
wrapped this one is going to get.

g++ -D_WIN32_ -D__GNUWIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ 
-O0 -g3 -Wall -fmessage-length=0 -fno-rtti -Wno-deprecated -DWIN32 
-fexceptions  -DWINDOWS -Dw32api --save-temps -dD -E

Can't think of a witty .sigline today....

Unsubscribe info:
Problem reports:

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