[AD] allegro readme for mingw32 staticlink |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
what more is there to say? you might want to verify and pretty-print
this stuff before you include it in the allegro distro. have a good day!
Sincerely Henrik Stokseth. (hstokset@xxxxxxxxxx)
______ ___ ___
/\ _ \ /\_ \ /\_ \
\ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
\ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
\ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
\ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
\/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
/\____/
\_/__/
Notes on building the staticly linked (what's-going-to-be-a-full-port)
MingW32 version of Allegro. Written by: H. Stokseth. Now you know whom to
blame if you find errors in this documentation :-)
See readme.txt for a more general overview.
=======================================
============ Mingw32 notes ============
=======================================
This is a full MingW32 port of Allegro, but it is not yet complete and should
only be used for testing and development. This version uses static linking.
If you want to use MingW32 for making a game or anything else you should be
using the MingW32 DLL version of Allegro. Read more in README.MGW
At some point in the future, this will become a full gcc port with a
natively compiled DLL and libraries for static linking, but some work
is yet to do; both in Allegro and MingW32 itself.
===========================================
============ Required software ============
===========================================
For the MingW32 part, you will need to obtain the following distributions
from the internet:
1) The MingW32 compiler, documentation and utilities from
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/
At the time of this writing (Nov. 1999) gcc-2.95.2 is out and one
should get gcc-2.95.2-crtdll.exe and mingw32-docs-html.exe.
IMPORTANT NOTE! Steps 2, 3 and 4 are necessary only because the standard MingW32
distribution at the time of writing doesn't include a full port of the DirectX
headers and libraries. So my solution was to use Mikey's ingenious port of MingW32
designed for porting Win32 software. This port is some some reason called the
'selfhosting MingW32 port' I find this naming a little strange. But anyways...
This way we can use Microsoft's own original DirectX headers and libraries.
If you just want to test this port and not do any serious work on it you can omit
theese steps (2,3 and 4) and you will end up with a partially working allegro where
approximately 70% of the examples work. Life sucks sometimes doesn't it? :-)
2) The MingW32 selfhosting base package containing tar and bzip ports for win32.
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/mingw32/porters/Mikey/ming-selfhost.zip
3) The MingW32 selfhosting binutils package containing the .LIB capable linker.
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/mingw32/porters/Mikey/binutils294-ming.tar.bz2
4) Some files from Microsoft: The Programmers SDK and The DirectX SDK.
NOTE! Theese files are available on CD-ROM for registered MS developers
and will save you from a huge download. if you have a fast internet connection
the file ming-selfhost-install.doc from the file ming-selfhost.zip explains
where to get this stuff and how to install it.
5) Create a directory for mingw32, e.g. c:\mingw32. Unpack everyting to this directory
preserving the directory structure and case of filenames. The Microsoft libraries should
be moved to c:\mingw32\i586-mingw32\lib and the headers to c:\mingw32\i586-mingw32\include
Delete the .a directx libraries if you're paranoid. I have a feeling they might be linked in
and thus might be creating problems for you by conflicting with the Microsoft ones.
6) Add this directory (c:\mingw32\bin) to your path in autoexec.bat.
7) If you want you can delete the directory c:\mingw32\src to free up some space.
On Windows 9x reboot your computer.
Test the installation by typing: gcc -v.
The answer should be simmilar to
Reading specs from C:\MINGW32\BIN\..\lib\gcc-lib\i386-mingw32\2.95.2\specs
gcc version 2.95.2 19991024 (release)
============================================
============ Installing Allegro ============
============================================
Step-by-step instructions on how to build the MingW32 staticly linked Allegro stuff.
You should already have installed MingW32 properly by now, if not do it before you continue...
cd c:\allegro
set STATICLINK=1
set MINGDIR=c:\mingw32
fixming
make -i
(and alternatively install the allegro headers & libraries... not recommended for the moment!)
make -i install
=======================================
============ Using Allegro ============
=======================================
All the Allegro functions, variables, and data structures are defined in
allegro.h. You should include this in your programs, and link with either
the optimised library liballeg.a, the debugging library liballd.a, or the
profiling library liballp.a.
Don't forget that you need to use the END_OF_MAIN() macro right after
your main() function!