On Mon, 21 Oct 2002, Patrik Stridvall wrote: [...]
However there are at least two intresting ways to compile and run the tests on Windows.
- Compile using the Wine headers.
- Compile using the Microsoft headers.
Currently only (1) works in a portable way.
To get (2) to work I had to add the directory of the Microsoft includes to the begining of the include path. This is not very portable since it differs from installation to installation. I have currently hardcoding my specific directory.
Actually there is a portable solution. Here's what i did when I compiled the Wine tests on Windows:
Run 'vcvars32.bat' first. When you install Microsoft Visual C++ you can either tell it to add environment variables with the useful stuff (either in autoexec.bat or the registry for NT), or just rely on 'vcvars32.bat'. This script is usually in the include directory: c:\Program Files\Microsoft Visual Studio\VC98\include\vcvars32.bat
Well, so I run it on the command line and then in the makefile (a realy .mak file) I put:
INCLUDE=$(TOTOP)\include;$(INCLUDE)
Then I don't use -I at all and the compiler will automatically use the environment variable. If using the .mak file directly from the IDE you don't even need to run vcvars32.bat,
However I still had include order problems: part of the headers were coming from MS and part from Wine but did not have time to look into it in detail. So I ended up extracting the tests from the Wine tree. But if you are able to avoid the header mixup then the above could work.