# Some more MSVC fixes

Patrik Stridvall ps at leissner.se
Wed Feb 6 08:58:59 CST 2002

> On Tue, 5 Feb 2002, Patrik Stridvall wrote:
>
> > I have finally tried to compile Wine with MSVC.
> > Eventhough I had to do some hack on the whole
> > it compiled quite well.
>
> Great. On a slightly related note, is it possible that we compile Wine
> with the MS headers? What would it take to do that?

Well. If you do as I did and just add just create
a Visual Studio Project (.dsp) for each DLL using the
to the include path to get it to use the Wine header.

As to how good it works with MS header:
Well, the problem is that if you don't add the path the
Wine header files like debugtools.h doesn't
exists so it doesn't compile very well and if
you do the Wine headers take priority.

more time after the Wine headers, but where they
are under Windows are installation dependent and not
very portable. :-(

Additionally windef.h must be included first.

#include "winbase.h"
#include "windef.h"

doesn't work. You have to do

#include "windef.h"
#include "winbase.h"

This is a minor issue though.

I also so got some other strange error with PCONTEXT
in winnt.h which in didn't understand.

In short it was a terrible mess so I primarily tested

I have only tested a few DLL since doing .dsp files for
each them was some work. I might do a script to
automatically generate .dsp files for MSVC some day.

> If we
> could, we would
> have one more degree of freedom:
>
>   --------  ---------  ------  -------
>   Linux     gcc        ELF     Wine
>   *BSD      MSVC       PE      MS
>   Solaris   Borland            ReactOS(?)
>   Cygwin
>
> Esentially, most of the above possible cobinations should
> work (except, of
> course Windows-base compilers and ELF).

Well. I think GNU C chokes on the MS headers so that
won't work either.

> If we get this level of portability, would be nice to set an automatic
> compile farm which tries all the possible combinations, and reports
> problems early, so they get fixed.

Yes, that would probably be a good idea.