question about standalone tests
Dan Kegel
dank at kegel.com
Wed May 25 11:13:54 CDT 2005
Alexandre Julliard wrote:
>>lzexpand_main.c
>>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
http://www.winehq.com/site/docs/wine-devel/testing-windows
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
from http://msdn.microsoft.com/visualc/vctoolkit2003
and the Microsoft Platform SDK
(from http://www.microsoft.com/msdownload/platformsdk/sdkupdate 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
http://cvs.winehq.org/cvsweb/wine/include/wine/test.h ).
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 http://kegel.com/wine/cl-howto.html
for some tips on making it easy to use from the Linux commandline.)
--- snip ---
--
Trying to get a job as a c++ developer? See http://kegel.com/academy/getting-hired.html
More information about the wine-devel
mailing list