Changelog: * documentation/testing.sgml Document how to cross-compile the tests with MinGW Index: documentation/testing.sgml =================================================================== RCS file: /home/wine/wine/documentation/testing.sgml,v retrieving revision 1.3 diff -u -r1.3 testing.sgml --- documentation/testing.sgml 5 Dec 2002 19:13:42 -0000 1.3 +++ documentation/testing.sgml 12 Dec 2002 21:58:27 -0000 @@ -256,18 +256,53 @@ <sect2> <title>Cross compiling with MinGW on Linux</title> <para> - Details are still pretty sketchy but it would go something like - this on a Debian machine: + Here is how to generate Windows executables for the tests straight + from the comfort of Linux. + </para> + <itemizedlist> + <listitem><para> + First you need to get the MinGW cross-compiler. On Debian all + you need to do is type <command>apt-get install mingw32</>. + </para></listitem> + <listitem><para> + If you had already run <command>configure</>, then delete + <filename>config.cache</> and re-run <command>configure</>. + You can then run <command>make crosstest</>. To sum up: <screen> -<prompt>$ </>apt-get install mingw32 -<prompt>$ </>cd ~/wine -<prompt>$ </>./configure -<prompt>$ </>make crosstest +<prompt>$ </><userinput>rm config.cache</> +<prompt>$ </><userinput>./configure</> +<prompt>$ </><userinput>make crosstest</> </screen> - </para> - <para> - You should then have Windows executables for the tests. - </para> + </para></listitem> + <listitem><para> + If you get an error when compiling <filename>winsock.h</> then + you probably need to apply the following patch: + <ulink url="http://www.winehq.com/hypermail/wine-patches/2002/12/0157.html">http://www.winehq.com/hypermail/wine-patches/2002/12/0157.html</> + </para></listitem> + <listitem><para> + You may also get the following link error: +<screen> +i586-mingw32msvc-gcc generated.cross.o testlist.cross.o -o urlmon_crosstest.exe -lurlmon -lm +/usr/lib/gcc-lib/i586-mingw32msvc/3.2/../../../../i586-mingw32msvc/bin/ld: cannot find -lurlmon +</screen> + </para><para> + If that happens or if you get the same error with another library, + then do the following: +<screen> +<prompt>$ </><userinput>pwd</> +~/wine/dlls/urlmon/tests +<prompt>$ </><userinput>cd ..</> +<prompt>$ </><userinput>make urlmon.spec.def</> +LD_LIBRARY_PATH="../../library:../../unicode:$LD_LIBRARY_PATH" ../../tools/winebuild/winebuild -fPIC -D__WINE__ -o urlmon.spec.def --def urlmon.spec +<prompt>$ </><userinput>make urlmon.spec.def</> +<prompt>$ </><userinput>/usr/i586-mingw32msvc/bin/dlltool --output-lib liburlmon.a --input-def urlmon.spec.def</> +</screen> + </para><para> + Then put the <filename>liburlmon.a</> library in a place where it + will be found by MinGW, or run the MinGW link command manually + adding '-L..'. + </para></listitem> + </itemizedlist> </sect2> </sect1> -- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ La terre est une bêta...