Vous êtes sur la page 1sur 7

Configuring the AGK Trial Template Project in

Visual Studio
Step 1: Open Windows Explorer, and go to the folder where the AGK Trial is installed. (If you
followed the instructions in Appendix A, you installed the AGK Trial in a folder named
AGK, under My Documents. This is the location that we recommend.)
Inside the AGK folder, go to the IDE folder, and then go to the templates folder, as
shown in Figure T-1. Inside the templates folder, you should see the folder shown in
Figure T-2.
Figure T-1 Go to the AGK\IDE\templates folder

Figure T-2 Contents of the AGK\IDE\templates folder

Step 2: As shown in Figure T-2, one of the folders is named template_vs10. This folder
contains the template project for Visual Studio 2010, which is the version we are using
in this book. Make a copy of the folder as shown in Figure T-3. (To copy the folder,
right-click the template_vs10 folder, then select Copy from the menu. Next, right-click
anywhere inside the templates folder, then select Paste.)

WARNING! You must paste the copy of the template_vs10 folder in the templates folder. If you
paste it anywhere else on your system, the Visual Studio compiler will not be able to find many
of the files that it needs to compile your project.
Figure T-3 Make a copy of the template_vs10 folder

Step 3: As shown in Figure T-4, rename the copy of the template_vs10 folder that you just
created. In the figure, we have renamed it as MyFirstAGKProject. (To rename the
folder, right-click it, then select Rename from the menu.)
Figure T-4 The folder renamed

Step 4: Go into the folder that you just renamed, and locate the file named template.sln (as
shown in Figure T-5). This is the Visual Studio solution file for the project. Doubleclick the file to open it in Visual Studio.
Figure T-5 Double-click the template.sln file

Step 5: In the Solution Explorer window in Visual Studio, double-click the on template
projects icon, and then double-click the template.cpp file to open it in the editor, as
shown in Figure T-6. This is the C++ file that contains the template AGK code that you
will work with in each project you create.
Figure T-6 Open the template.cpp file in the editor

Step 6: Before you can compile and run your project, you must change the Visual Studio
Solution Configurations setting from Debug to Release. To do this, click on the
Solution Configurations list box in the standard toolbar, and then select Release from
the list, as shown in Figure T-7.
WARNING! You must change the Solution Configurations setting in Visual Studio from Debug
to Release. If you try to compile and run your project using the Debug setting, the Visual Studio
Compiler will generate errors.
Figure T-7 Release is selected from the list

Step 7: Click File on the menu bar, then click Save All to save the project with the new settings.

Vous aimerez peut-être aussi