This is the mail archive of the cygwin@sourceware.cygnus.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]

How to use the MS headers (first attempt)


Hi Josh !
 
> Could you help me or direct me to information that would help me make the
> changes necessary to be able to use the MS headers.  I am mainly trying to
> get code written for VC++ (from Charles Petzold's book, "Programming
> Windows 95" to compile with a free compiler.
> 	Any help you can give me would be greatly appreciated.
> 					Josh Little
> 

This is rather difficult for me, since I write my mail here on my working
place but have GNU-Win32 installed on my PC at home. So let me try anyway:

- Delete the Windows related headers from cygwin, mingw32, etc.

- Copy the MS headers in a directory and let C_INCLUDE_PATH point to
  this directory, too (I have no experience with C++)

- Download RSXNT131 and copy the files wingnuc.h and excpt.h into this
  directory (and NOT windows.h as I said in a previous message, sorry)

- Also extract patch.exe and patch.diff

- Run patch.exe on patch.diff as explained in rsxnt.hlp (section how to
  use the MS headers or something like that)

- At the beginning of windows.h include wingnuc.h

- Comment out the definitions (I think two) in wingnuc.h which appear
  somewhere else (you get a warning like redefinition of ... if you
  include windows.h)

- Now everything should work fine unless you include shlobj.h (for the
  shell functions). If you don't need them skip this point. Otherwise, just
  look at the errors you get. Most of them are related to nameless
  structures and unions (too many to list here). For those, just add a
  (dummy) name in shlobj.h and the headers included by this one.

- If you want to use mingw32, you have to predefine two values from
  wingnuc.h. Sorry, right now I'm not sure which ones. I think SIZE_T_DEFINED
  and a similar one (or HAVE_SIZE_T - no idea, but the errors or warnings
  should make this clear). So, add -DSIZE_T_DEFINED etc. to your CFLAGS.

That's it (as far as I remember at the moment). As I said, please don't blame
me for any mistakes, I had to do this from scratch. If you encounter problems,
just let me know, and I'll check it at home.


Best wishes,

   Axel


===============================================================================
Axel Riese
Research Institute for Symbolic Computation
J. Kepler University Linz
A-4040 Linz                              e-Mail: Axel.Riese@risc.uni-linz.ac.at
Austria             URL: http://www.risc.uni-linz.ac.at/research/combinat/risc/
===============================================================================
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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