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/wine-devel@winehq.org/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
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@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.
On 06/02/2008, Dan Kegel dank@kegel.com wrote:
After giving up for the moment on building with Visual C 6, I tried Visual Studio 2005.
Do you know where the Express download is for this, as I can only find VS 2008 Express?
These links (as well as the Platform SDK stuff) would be useful adding to the building test documentation.
First hitch: Boy, does it spew out lots of warnings about deprecated functions!
This is the same for 2008.
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.
It looks as if those tests need to be set to compile with C++ for the SDK tests asnd add a "using namespace GdiPlus;" to them.
Alternatively, disable them for the SDK headers and use the Wine ones.
Golly. I guess I won't be building the tests with any flavor of microsoft C any time soon!
I have managed to get most of the tests building.
When I get the chance, I'll look at geetting msvcmaker to generate the VC project files, but these keep changing and are incompatible with each other!
To do it properly, VC 2002, VC 2003, VC 2005 and VC 2008 project files need to be supported. I don't currently have access to the 2002 (7.0) tools, but the format should be close to 2003 after the version number differences.
- Reece
On Feb 5, 2008 11:28 PM, Reece Dunn msclrhd@googlemail.com wrote:
Do you know where the Express download is for this, as I can only find VS 2008 Express?
Nope. I just happen to have an old copy.
On Feb 6, 2008 2:32 AM, Dan Kegel dank@kegel.com wrote:
On Feb 5, 2008 11:28 PM, Reece Dunn msclrhd@googlemail.com wrote:
Do you know where the Express download is for this, as I can only find VS 2008 Express?
Nope. I just happen to have an old copy.
My copy of 2008 or 2009 cannot import the VC6 makefiles for the dlls. I am assuming its choking on the custom commands. Can someone take a poke at this as well?
On 06/02/2008, Steven Edwards winehacker@gmail.com wrote:
On Feb 6, 2008 2:32 AM, Dan Kegel dank@kegel.com wrote:
On Feb 5, 2008 11:28 PM, Reece Dunn msclrhd@googlemail.com wrote:
Do you know where the Express download is for this, as I can only find VS 2008 Express?
Nope. I just happen to have an old copy.
My copy of 2008 or 2009 cannot import the VC6 makefiles for the dlls. I am assuming its choking on the custom commands. Can someone take a poke at this as well?
Yeah, I got that for VC 2008.
Also, I'm building a document [http://docs.google.com/View?docID=dfkc9w32_1cxfvb2c7&revision=_latest] that describes the format of the VC project formats. This is with the intention of using that information in msvcmaker to generate the sln/vcproj files directly for your chosen version of VC.
Ideally, this information should be documented in a file along side msvcmaker (along with the format of the dsp/dsw files) so that maintainers can understand the project formats.
- Reece
On Mi, 2008-02-06 at 07:28 +0000, Reece Dunn wrote:
On 06/02/2008, Dan Kegel dank@kegel.com wrote:
I tried Visual Studio 2005.
Do you know where the Express download is for this, as I can only find VS 2008 Express?
Download Page for "Visual * 2005 Express Edition": http://www.microsoft.com/express/2005/download/offline.aspx
VS2005 SP1 update for Vista: http://www.microsoft.com/downloads/details.aspx?familyid=90E2942D-3AD1-4873-...
For the Visual C++ Toolkit 2003: http://www.google.de/search?q=VCToolkitSetup.exe v1.0 was released 16. April 2004 v1.01 was released 06. July 2004