On Mon, Mar 3, 2008 at 8:51 AM, Steven Edwards winehacker@gmail.com wrote:
The default search order for the headers on cygwin/mingw is host then Wine so if you just remove or rename the w32api headers you will end up including the Wine headers which may fix the problem.
That did it. So the full procedure, for the record, is:
1. Download and run the installer from http://cygwin.com Use it to install gcc, git, make, flex, and bison.
2. Open a cygwin window
3. Grab a copy of the Wine sources using git as normal
4. Configure wine, build widl, and use it to expand .idl files to .h files. $ cd wine $ ./configure $ cd libs/port; make; cd - $ cd libs/wpp; make; cd - $ cd tools/widl; make; cd - $ cd include; make; cd -
5. cd wine/dlls/oleaut32/tests
5. to avoid conflicts between the win32 headers from wine and from cygwin, just use the wine ones. The easiest way to nuke the cygwin ones is to do $ mv /usr/include/w32api /usr/include/w32api.x
6. Try compiling and linking your test. e.g. $ cd wine/dlls/oleaut32/tests $ gcc -DSTANDALONE -I../../../include olepicture.c -mno-cygwin -loleaut32 -lole32 -luuid This fails with all sorts of errors about LOGFONTA. That's because the include lines in olepicture.c are in the wrong order! Edit olepicture.c and change the lines
#include <winuser.h> #include <wingdi.h>
to read
#include <wingdi.h> #include <winuser.h>
7. Try compiling again. It should work now. To run your standalone test, do $ ./a.exe If you need more verbose output, do $ WINETEST_DEBUG=1 ./a.out That will enable trace() statements.