\documentclass[a4paper,final,10pt]{article}

\title{WinMain}
\author{\'{A}noq of the Sun, Hardcore Processing
\footnote{\copyright 1998-2001 \'{A}noq of the Sun} (alias Johnny Andersen)}

\begin{document}

\maketitle

\section{Versions of this document}

There are HTML, LaTeX, PDF and PostScript versions of this document:

\begin{itemize}
\item \verb'http://www.HardcoreProcessing.com/pro/winmain/index.html'
\item \verb'http://www.HardcoreProcessing.com/pro/winmain/index.pdf'
\item \verb'http://www.HardcoreProcessing.com/pro/winmain/index.ps'
\item \verb'http://www.HardcoreProcessing.com/pro/winmain/index.tex'
\end{itemize}

\section{Introduction}

WinMain is a very small library which will make
\verb'C' or \verb'C++' programs written for
other operating systems than Windows compile on
the Windows operating systems.

I have only used this library for crosscompiling applications
from Linux to Windows with the \verb'Mingw32' cross-compiler version of gcc.

\section{Installing}

\begin{enumerate}
\item Download and unpack this file: \verb'WinMain_20000907.tar.gz'
\item Unpacking can usually be done with these commands:
\begin{verbatim}
gzip -d WinMain_20000907.tar.gz
tar -xvf WinMain_20000907.tar
\end{verbatim}
\item This will create a directory called WinMain and a
subdirectory called srcC.
Go to this subdirectory by typing:
\begin{verbatim}
cd WinMain/srcC
\end{verbatim}
\item To use the library for crosscompiling applications from
Linux to Windows, activate your gcc crosscompiler (by setting
the appropriate paths) and type:
\begin{verbatim}
make target=win32           
\end{verbatim}
This should hopefully create a library file called libwinmain.a.
\end{enumerate}
This library was written for crosscompiling from Linux to
Windows so this is the only way it has been tested. However it
might also work for crosscompiling from other operating
systems to Windows or for compiling natively on Windows
since the makefiles also should support other operating systems.

\section{Using WinMain in your projects}

\begin{enumerate}
\item Include the file winmain.h in the C sourcecode file with your main function,
like this:
\begin{verbatim}
#include <winmain.h>           
\end{verbatim}
When using gcc you should problably add this
compiler flag:
\begin{verbatim}
-I<path_to_WinMain>/WinMain/srcC           
\end{verbatim}
\item Link your application with libwinmain.a. With gcc this is done with these
2 compiler flags:
\begin{verbatim}
-L<path_to_WinMain>/WinMain/srcC -lwinmain           
\end{verbatim}
\end{enumerate}

\end{document}