Some more MSVC fixes

Francois Gouget fgouget at free.fr
Wed Feb 6 13:24:07 CST 2002


On Wed, 6 Feb 2002, Patrik Stridvall wrote:

> > On Wed, 6 Feb 2002, Patrik Stridvall wrote:
[...]
> > Wouldn't it be
> > easier to use our Makefile system under cygwin to compile
> > Wine with MSVC?
>
> Possible. However I don't know exactly cygwin works.

   There are subtle differences between how the Unix makefiles work and
how the Windows makefiles work. In addition to that the MSVC compiler
supports different options, etc. Using the cygwin make tool (i guess
they provide one) could help but it would not solve the compiler option
problem. Plus cygwin works in a world where all paths are Unix paths
while the MSVC compiler expects you to use drive letters (but will
happily accept '/'s). In any case you would most likely end up rewriting
the makefiles and this would as much work as just generating brand new
.dsp files.


> Personally I think that the ultimate solution would be to
> automatically generate the .dsp files from Makefile.in or otherwise.

   May not be easy but you are pretty good with perl so if anyone can
pull it off it's you :-)
   Once you have all the .dsp files, make a big .dsw file in the
top-level directory that references all the other .dsp files. That way
you can double-click on the .dsw, and then pick which dll you want to
build, build them all at once, etc. I guess you already know about them
(and they are really simple to generate).


> Hmm. Well, I gave the MS headers one more try and discovered
> a few not so nice things.
>
> If you have a Wine specific include like below in a file:
> #include "heap.h"
> and this file heap.h in turn has a
> #include "winbase.h"
> it will include the Wine version of the file instead of the
> MS version. This is probably because with "" files in the
> same directory has priority IIRC.

   No, that's because we use '-I .', which is a questionable practice.
Unfortunately I believe there is something that makes it hard to avoid
in Wine's case. I cannot remember what though.


> > > Of course you could add the MS header for inclusion one
> > > more time after the Wine headers, but where they
> > > are under Windows are installation dependent and not
> > > very portable. :-(
> >
> > Yeah, but that could be determined by configure.
>
> True.

   But you would have to run configure on Windows, no? Since configure
is a shell script this means you need something like cygwin to compile
the source :-/ Or did you mean to run configure on Unix to generate just
the right Makefiles for use on Windows?



--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
 Advice is what we ask for when we already know the answer but wish we didn't
                                 -- Eric Jong





More information about the wine-devel mailing list