w32api/winnt.h BUILD Problem

Dave Korn dave.korn@artimi.com
Tue Nov 14 00:03:00 GMT 2006


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


  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__ 
-D__WXDEBUG__ 
-I"C:\Eclipse_Workspace\Analyzer_General\ApplIncludes\analyzer\include" 
-I"C:\Eclipse_Workspace\Analyzer_General\ApplIncludes\analyzer\interface\inclu
de" 
-I"C:\Eclipse_Workspace\Analyzer_General\ApplIncludes\analyzer\pgeneral\includ
e" 
-I"C:\Eclipse_Workspace\Analyzer_General\ApplIncludes\Pat_Includes" 
-I"C:\Eclipse_Workspace\TriPac_CDs\TriPac_c_CD\flexlm\v7.2\i86_n3a" 
-I"C:\Eclipse_Workspace\TriPac_CDs\TriPac_c_CD\flexlm\v7.2\machind" 
-I"C:\Eclipse_Workspace\Analyzer_General\ApplIncludes\analyzer\general\include
" 
-O0 -g3 -Wall -fmessage-length=0 -fno-rtti -Wno-deprecated -DWIN32 
-fexceptions  -DWINDOWS -Dw32api --save-temps -dD -E
"../analyzer/interface/src/Analyzer.cxx"


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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



More information about the Cygwin mailing list