- Run the IDE and create a new Allegro project by selecting File -> New -> Project.

- From the pop-up window, select Multimedia -> Allegro Application -> C++ Project -> (Enter the Project name as "TestAllegro") -> Click 'Ok'.

- Now, a window will pop-up asking you to save the project at some location. Save the project at "D:\Example Allegro" and press save button.

- Now a new Project named "TestAllegro" will be created under the path "D:\Example Allegro". A sample file named main.cpp, that includes allegro.h will also be generated by default, but it is not yet, saved in any directory.
- As you are having a sample source code file i.e., main.cpp, you can compile the project. When you compile the project, all the output files and intermediate files that are generated during compilation will be saved in the directory where project is saved. In this case, it is "D:\Example Allegro".

- But you have not saved the source file main.cpp. So, a window will pop-up asking you to specify the location where you wan to save the source file main.cpp. Again specify the path for source file as, "D:\Example Allegro".

- Now, the project will compile successfully and a Compile progress window will pop-up giving you the status as Done. If, it doesn't happen then there might be something wrong with your source code.

- Now, run the the project from the IDE.


- By default, the close and restore Down/Maximize buttons of the window are disabled. It order to enable them user must insert his own code which will specify the functionality of those buttons.
- Use task manager to kill the window.

- You can even run the application window by, double-clicking the executable file, which is of application type.By default, the executable file is generated under the same directory where the project is saved and the executable file will also take the same name as that of the project. In this case the directory is "D:\Example Allegro" and the executable files is TestAllegro.exe.


Wednesday, July 7, 2010
Getting Started With Allegro: the game programming library in C/C++
For the beginners, here is a simple tutorial that will guide you in getting started with Allegro library:
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment