question about standalone tests

Dan Kegel dank at
Wed May 25 11:13:54 CDT 2005

Alexandre Julliard wrote:
>>h:\demo\x\wine\test.h(128) : error C2065: 'stdout' : undeclared identifier
>>Adding #include <stdio.h> to wine/test.h fixes that first problem, but leaves
>>h:\demo\x\wine\test.h(264) : error C2065: 'winetest_testlist' : undeclared identifier
> I put in some fixes, it should work better now.

Looks good, thanks!

Now somebody should update

with a new section sorta like the following
(Yeah, I should check this text in, but I gotta run.  At least I wrote a first draft, eh?):

--- snip ---

5.5.4  Standalone, using the Microsoft C++ Toolkit

Sometimes it's nice to be able to build a new unit test
on Windows without Wine, and without buying Microsoft Visual C++.
Here's the simplest way to do that on a Windows system:

Download and install the free-as-in-beer Microsoft C++ Toolkit
and the Microsoft Platform SDK
(from using IE5 or later!).

Make a directory 'wine' underneath your work directory,
and copy the file wine/test.h from the Wine source tree there.
(You can download this file from the latest revision at ).

Copy some existing test from the Wine source tree, or
create your test program (say, mytest.c) using Notepad,
being sure to begin it with
#include <wine/test.h>
following the usual Wine test style.

Finally, in a command prompt window,
compile the test with the command
   cl -I. -DSTANDALONE -D_X86_ mytest.c

Once that's working, try running the program under Wine without
recompiling it.   See?  No Wine source required at all,
save for that one header, wine/test.h.

(If you want to use the Microsoft C++ Toolkit under Wine,
install it under Windows, then copy it to your fake C drive;
it'll work fine there.  See
for some tips on making it easy to use from the Linux commandline.)

--- snip ---

Trying to get a job as a c++ developer?  See

More information about the wine-devel mailing list