Call me an oldtimer, but I decided to try building winetest with MSVC 6 today.
I installed cygwin's git and perl, grabbed wine from git, and used msvcmaker as described at http://winehq.org/site/docs/winedev-guide/testing-windows
I downloaded and installed the Platform SDK from the first google hit, the Windows Server 2003 SP1 Platform SDK, http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-... (although the latest is Windows Server 2003 R2 Platform SDK, I thought the slightly older one would be ok). Oddly, Microsoft's Platform SDK page lists the SP1 SDK as the latest. Pffft.
I then used Tools/ Options / Directories to tell msdev about include and lib in both msvc6 and the platform SDK. Then I tried building wineruntests.
First hitch: error C2065: 'RRF_RT_REG_DWORD' : undeclared identifier Fix: Move Platform SDK higher in the priority list in Tools / Options / Directories. msdev will then use the newer headers, which have that symbol.
Second hitch: Linking... uuid.lib(cguid_i.obj) : fatal error LNK1103: debugging information corrupt; recompile module Error executing link.exe. Fix: From http://blogs.msdn.com/stephen_griffin/archive/2006/08/03/building-mfcmapi-wi... In the platform SDK's lib directory, rename uuid.lib to uuid.lib.bad. msdev will then use the older library. (Microsoft intentionally removed VC6 support from the newer one, whoops.)
Third hitch: http://www.winehq.org/pipermail/wine-patches/2007-September/043988.html introduced a type LSTATUS into winreg.h. This isn't present in the 2003 SP1 platform sdk, nor in the newer 2003 R2 platform SDK, but as long as only our winreg.h uses it, that's fine. Sadly, that patch uses it elsewhere, so compilation breaks. A google search for LSTATUS at microsoft.com finds nothing. Fix: change the LSTATUS in comctl32/tests/mru.c to LONG (gee, maybe we should move the definition of LSTATUS from winreg.h to advapi32/registry.c, too). (But see below.)
Fourth hitch: comdlg32\tests\printdlg.c: error C2064: 'LPPRINTDLGEXW' : undeclared identifier Turns out commdlg.h in the platform sdk only defines LPPRINTDLGEXW if STDMETHOD is declared. STDMETHOD is declared in basetyps.h, but including that file makes commdlg.h not even compile. Bleah. Fix: replace the #include "windef.h" ... "winuser.h" with #include "windows.h" in comdlg32/tests/printdlg.h.
Fifth hitch: crypt32/tests/cert.c: error C2081: 'HCRYPTPROV_OR_NCRYPT_KEY_HANDLE': name in formal parameter list illegal Turns out that identifier was introduced in Vista, and added to Wine here: http://www.winehq.org/pipermail/wine-patches/2007-August/042250.html Fix: Uninstall the platform SDK and install the Windows SDK! http://www.microsoft.com/downloads/details.aspx?familyid=c2b1e300-f358-4523-...
Sixth hitch: c:\program files\microsoft sdks\windows\v6.0\include\specstrings.h: fatal error C1083: cannot open include file 'sal.h' I think sal.h comes with Visual Studio 8 and higher. Crap.
Thus it looks like you can't build wine's tests with Visual C 6 and the Microsoft headers anymore.
So I tried building with the Wine headers. That blows up with "can't find stdio.h".
So I'm stuck. What's the recommended way to build the wine test suite with Visual C 6, if any? - Dan
On Tue, 5 Feb 2008, Dan Kegel wrote:
Building tests with MSVC 6 broken?
Yes. MSVC 6 really starts to show its age.
It has trouble with some math stuff (rather large constants) used in one of the tests. That can be worked around by applying a service pack. See: http://www.winehq.org/site/docs/winedev-guide/testing-windows
But the show stopper is that it is incompatible with the latest SDKs. * First there's the LSTATUS stuff. The PSDK assumes it's defined in a header that's provided by Visual C++ (basetyps.h), but VC6 does not have it. Same for sal.h. * Then there's the format of some of the PSDK libraries which MSVC 6 does not understand. That's the error you got with uuid.lib but it happens with others too (all static libraries I believe).
The solution is to use Visual Studio 2005 which is a free download. There's still some hitches there: * it does not use .dsp files anymore but can convert them to the new XML build files. * in the process it loses some dll imports so you'll have to add them back manually, for each test. So it's feasible to compile individual tests but compiling all of them is a real pain. * you'd better add _CRT_NONSTDC_NO_DEPRECATE and _CRT_SECURE_NO_DEPRECATE otherwise you'll get a ton of warnings.
What this means is that msvcmaker needs to be updated to generate the new XML build files directly, all with the right settings.
On Feb 5, 2008 5:01 PM, Francois Gouget fgouget@free.fr wrote:
The solution is to use Visual Studio 2005 which is a free download. There's still some hitches there:
- it does not use .dsp files anymore but can convert them to the new XML build files.
- in the process it loses some dll imports so you'll have to add them back manually, for each test. So it's feasible to compile individual tests but compiling all of them is a real pain.
- you'd better add _CRT_NONSTDC_NO_DEPRECATE and _CRT_SECURE_NO_DEPRECATE otherwise you'll get a ton of warnings.
I gathered that, but check out my next post, there are other roadblocks. Maybe if I use the right Windows SDK (as pointed out by John Klehm) some of these will go away.
What this means is that msvcmaker needs to be updated to generate the new XML build files directly, all with the right settings.
Yep.
On Tue, 5 Feb 2008, Dan Kegel wrote:
On Feb 5, 2008 5:01 PM, Francois Gouget fgouget@free.fr wrote:
The solution is to use Visual Studio 2005 which is a free download. There's still some hitches there:
- it does not use .dsp files anymore but can convert them to the new XML build files.
- in the process it loses some dll imports so you'll have to add them back manually, for each test. So it's feasible to compile individual tests but compiling all of them is a real pain.
- you'd better add _CRT_NONSTDC_NO_DEPRECATE and _CRT_SECURE_NO_DEPRECATE otherwise you'll get a ton of warnings.
I gathered that, but check out my next post, there are other roadblocks. Maybe if I use the right Windows SDK (as pointed out by John Klehm) some of these will go away.
I remember that when I was still using VC6 I regularly had to update the PSDK in order to make the conformance tests happy (but note that I had a bias towards using the PSDK headers). But at some point I became stuck because I couldn't get the new PSDKs to work with VC6. That's when I got forced to switch to VC2005.
So I'm not sure there exists a PSDK that's both recent enough for the conformance tests and compatible with VC6.
On Feb 5, 2008 4:25 PM, Dan Kegel dank@kegel.com wrote:
Fifth hitch: crypt32/tests/cert.c: error C2081: 'HCRYPTPROV_OR_NCRYPT_KEY_HANDLE': name in formal parameter list illegal Turns out that identifier was introduced in Vista, and added to Wine here: http://www.winehq.org/pipermail/wine-patches/2007-August/042250.html Fix: Uninstall the platform SDK and install the Windows SDK! http://www.microsoft.com/downloads/details.aspx?familyid=c2b1e300-f358-4523-...
I don't know if this will help with compiling the tests. but I have fought with that many headed SDK nonsense too.
Sorry Dan you still don't have the latest SDK =P (assuming you used the one with the link you gave).
You have linked to the one published 2006-11-07: "Microsoft(R) Windows(R) Software Development Kit for Windows Vista™ and .NET Framework 3.0 Runtime Components"
Trickily enough the latest SDK is actually published on 2007-03-22: "Microsoft(R) Windows(R) Software Development Kit Update for Windows Vista™" http://www.microsoft.com/downloads/details.aspx?FamilyID=4377F86D-C913-4B5C-...
The only sane way I've found to find out what the heck is going on with the SDK is the blog page: http://blogs.msdn.com/windowssdk/
but lately they have this page now too (which hopefully will stay maintained? who can say..) that lists the latest sdk right now (in theory) http://msdn2.microsoft.com/en-us/windowsserver/bb980924.aspx
So maybe grabbing the latest sdk will help maybe it won't. Hopefully this will save everyone some time in crazy msdn land.
Regards, John Klehm
On Feb 5, 2008 5:24 PM, John Klehm xixsimplicityxix@gmail.com wrote:
crypt32/tests/cert.c: error C2081: 'HCRYPTPROV_OR_NCRYPT_KEY_HANDLE': name in formal parameter list illegal Turns out that identifier was introduced in Vista, and added to Wine here: http://www.winehq.org/pipermail/wine-patches/2007-August/042250.html Fix: Uninstall the platform SDK and install the Windows SDK! http://www.microsoft.com/downloads/details.aspx?familyid=c2b1e300-f358-4523-...
I don't know if this will help with compiling the tests. but I have fought with that many headed SDK nonsense too.
Yeah, I saw your post about make crosstest dependencies, too, thanks.
Sorry Dan you still don't have the latest SDK =P (assuming you used the one with the link you gave).
You have linked to the one published 2006-11-07: "Microsoft(R) Windows(R) Software Development Kit for Windows Vista™ and .NET Framework 3.0 Runtime Components"
Trickily enough the latest SDK is actually published on 2007-03-22: "Microsoft(R) Windows(R) Software Development Kit Update for Windows Vista™" http://www.microsoft.com/downloads/details.aspx?FamilyID=4377F86D-C913-4B5C-...
Thanks for the tip! - Dan