About
Allegro is an open-source game programming library, intended primarily for C and C++ developers.Installation/Quickstart
1. Install pre-built binaries
- Web site is https://www.allegro.cc/files/
- Download the version matching gcc version: 4.6.2
- Copy bin files into personal bin directory
- Copy lib files into personal lib directory
- Copy include files into personal include directory
2. Download PDF documentation
- Web site is https://www.allegro.cc/files/
3. Download Examples
- Web site is https://www.allegro.cc/files/
4. Adjust environment
- Add C:\Users\%USERNAME%\bin into personal PATH variable in Windows
5. Refer to the binary package release notes
6. Compile example file ex_windows.c
- Compile command: gcc -Wall -std=gnu99 -o ex_windows ex_windows.c -lallegro-5.0.8-md -lallegro_font-5.0.8-md -lallegro_image-5.0.8-md
7. (Optional) Install symbolic links for convenience or for ease of upgrading
- Go to directory where you installed the library .a files
- In this example we will make links from the non-static and non-monolithic versions of the library
- An elevated command prompt is needed in Windows to execute the MKLINK command.
- Also, use the MinGW "sh" command interpreter for the following command and easily create the links:
do
[ "${f//*monolith*/}" != "" ] &&
[ "${f//*static*/}" != "" ] &&
echo mklink ${f%%-*}.a $f &&
cmd "/c mklink ${f%%-*}.a $f"
done
cmd "/c cacls * /T /C /E /G YourUserName:F"
With these links in place, it is possible to link the example in Step 6 using the switches "-lallegro -lallegro_font -lallegro_image" and this will be indepedent of the current version of Allegro installed on the system.
Keine Kommentare:
Kommentar veröffentlichen