Running tests on windows
fgouget at free.fr
Mon Apr 8 00:23:47 CDT 2002
On Sun, 7 Apr 2002, Geoffrey Hausheer wrote:
> Last week I submitted a perl script that makes a Makefile (and archive
> bundle) for building tests on Windows boxes under cygwin. Well, it works
> fine with mingw too (when using msys at least), but there is a snag.
> In order to compile tests under Windows, I seem to need to include windows.h
> before any other .h files. I did this using the '-include' directive in gcc,
> but it requires knowledge of the absolute path to the windows.h file. This
> means I need to specify the path in the Makefile, which is completely
> non-portable (especialy with mingw which doesn't really have a default setup
> like cygwin does).
> 1) So it seems I have three options. I can append '#include <windows.h>' to
> each .c file (either wrapped in #define, or through the perl script)
> 2) I can include the entire wine /include directory in the archive, and use
> that 'windows.h' to build against.
> 3) I can just force the user to edit the Makefile to point to the correct
> include directory.
> I don't really like any of these options (though 3 is the the easiest to
> implement, as this is how it works now)
> So is there a better solution than the three I've listed?
I think I will work on extending your script to also generate
Makefiles for use with Visual C++. The way it will work with Visual C++
is that you are supposed to run a batch script provided by Visual C++
(vcvars32.bat). This script sets a number of environment variables
which point to the location of the headers, etc. and which you can also
use in your Makefiles.
Does Mingw provide something similar? Could we have a way of forcing
the user to set some environment variables or query the values from him?
(my batch-script skills are pretty rusty :-)
> And why won't wine let me include 'windows.h', but under windows it is
Because winedows.h includes everythign and anything. We want Wine
files to only include the headers they need. The problem is that the
Wine tests are compiled as if they were part of the Wine sources instead
of being compiled like Winelib applications, which they are. This means
they are subject to the same restrictions as Wine sources: windows.h is
forbidden, and Xxx is forbidden, you must use XxxA or XxxW (see
IDI_APPLICATION & co for why this is a problem).
About using the Mingw headers vs. the Wine headers vs. Visual C++
headers. I say: use the headers of the environment in which you are. So
when compiling with Mingw use the Mingw headers and when compiling with
Visual C++ use the Visual C++ headers. As long as we don't use the Wine
headers on Windows...
Hopefully the Mingw headers will be complete enough for our tests.
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
The software said it requires Win95 or better, so I installed Linux.
More information about the wine-devel