Building tests with Visual Studio 2005 Express

Francois Gouget fgouget at free.fr
Tue Feb 5 21:06:44 CST 2008


On Tue, 5 Feb 2008, Dan Kegel wrote:

> After giving up for the moment on building with Visual C 6,
> I tried Visual Studio 2005.
> 
> First hitch:
> Boy, does it spew out lots of warnings about deprecated functions!
> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=87401&SiteID=1
> talks about this a bit; defining _CRT_SECURE_NO_DEPRECATE
> and _CRT_NONSTDC_NO_DEPRECATE suppresses the warnings.

commit aba98c62b4d44aae5d3e199acc6d7efceb7be417
Author: Francois Gouget <fgouget at free.fr>
Date:   Fri Feb 2 16:26:36 2007 +0100

    msvcmaker: Add _CRT macros to avoid being flooded with Visual Studio 
2005 warnings.

diff --git a/tools/winapi/msvcmaker b/tools/winapi/msvcmaker
index 50644ac..2176a9e 100755
--- a/tools/winapi/msvcmaker
+++ b/tools/winapi/msvcmaker
@@ -642,6 +642,8 @@ sub _generate_dsp($$) {
                push @includes, $wine_include_dir;
            }
        }
+       # Add these _CRT macros to avoid warnings with Visual Studio 2005
+       push @defines2, "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE";
 
        if($wine) {
            foreach my $include (@includes) {

But this patch is no good because we should really only set these 
when generating project files in the new format.


[...]
> Third hitch:
> error C2065: 'PFORM_INFO_2A': undeclared identifier
> See http://msdn2.microsoft.com/en-us/library/aa383745(VS.85).aspx
> and http://blogs.msdn.com/oldnewthing/archive/2007/04/11/2079137.aspx
> winspool.h only defines the new symbol if NTDDI_VERSION is NTDDI_LONGHORN
> or higher.  NTDDI_LONGHORN is 0x06000000.
> Fix:
> add /D _WIN32_WINNT=0x0600 to that list of changes to all the .dsp
> files in hitch #1 above.

Well, usually these are defined at the start of the relevant conformance 
test files. See dlls/shell32/tests/shlexec.c for instance.


[...]
> Fifth hitch:
> generated.c refers to CS_STUB_INFO, which is not defined in
> Microsoft's rpcndr.h.
> ??

It used to be there but has apparently been removed in the latest SDKs. 
The problem is the generated.c files are not being regenerated very 
often. It probably also means we should update our rpcndr.h to match 
the latest PSDK.


> Sixth hitch:
> it can't find server.h
> Seventh hitch:
> can't find tmarshal.h
> Fix:
> Not sure, but maybe these files need to be generated by midl, and msvcmaker
> doesn't know about that yet?  See
> http://www.mail-archive.com/wine-devel@winehq.org/msg37442.html

Yes.

 
> Eighth hitch:
> riched20/tests/editor.c fails to compile because in GETTEXTEX, the
> field is named lpUsedDefChar, not lpUsedDefaultChar
> Fix:
> fix our richedit.h?

Sent a patch. This is why it's useful to compile the conformance tests 
with the PSDK headers.


-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
May your Tongue stick to the Roof of your Mouth with the Force of a Thousand Caramels.



More information about the wine-devel mailing list