Building tests with Visual Studio 2005 Express

Dan Kegel dank at kegel.com
Tue Feb 5 19:50:13 CST 2008


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.
Fix:
You can't set them via corewin_express.vsprops because our project is
converted from an
older visual studio version, so you have to add those two defines to
all the .dsp files, e.g.
  perl -p -i -e 's,/D "WIN32",/D "WIN32" /D
"_CRT_NONSTDC_NO_DEPRECATE" /D "_CRT_SECURE_NO_DEPRECATE",'  `find .
-iname '*.dsp'`

Second hitch:
For some reason, the imported projects lose their list of .lib files to link
against.
Fix:
As suggested at
http://msdn2.microsoft.com/en-us/express/aa700755.aspx
add user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib
to the "Additional Dependencies" setting in the file corewin_express.vsprops.

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.

Fourth hitch:
urlmon_test.exe refers to CLSID_IdentityUnmarshal, but that symbol is
not defined.
??

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

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/[email protected]/msg37442.html

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

...

Seventy-seventh hitch:
gdiplus/tests/brush.c includes Microsoft's gdiplus.h, but that's not
safe to include from C, so you get an error on the namespace.

Golly.  I guess I won't be building the tests with any flavor of
microsoft C any time soon!
- Dan



More information about the wine-devel mailing list