Importing Samples

Let’s see how to import the sample in the GlistEngine step by step.

1) We will use the Project Explorer window on the left in the IDE.

2) Let’s right click on an empty field in this window. “New, Import, Export and Refresh” options will appear. We will use the New option here.

Normally the import option was used for import process but CMake projects do not have an import feature in CDT. For this reason, we use the “new” option.

3) Click on the “New” option and select the “C / C++” option in the window that opens

4) We will see a screen like the following figure. Let’s select the “Empty or Existing CMake Project” option in the 4th row and press “Next”.

5) When creating a new CMake project, firstly uncheck “Use default location” and select the “C:\dev\glist\glistengine\samples\gisImage” directory by pressing the “Browse” button. Secondly, name the project as “gisImage” and press “Finish” to end it.

** Make sure “use default location” option is unselected. **

6) Finally, we can see the gisImage sample project in the Project Explorer window. Let’s just click here once.

7) This is how we opened gisImage. There is a small arrow next to the run button in the toolbar. Let’s click this arrow and select the “gisImage relaise” option from the drop-down list.

After this step, we can see the animation move on the screen.

8) Let’s go back to Project Explorer and press the arrow key to the left of gisImage in Project Explorer, a window will open in here. Let’s press the arrow button to the left of “src” in the drop-down list. From here, a list will open down again, double click the GameCanvas.cpp and GameCanvas.h files in this list.

Now, we can see the source code of gisImage in the IDE.

9) In the next step, we will press the project in the toolbar and select the properties from the drop-down list.

10) A window named “Properties for gisImage” will open. In this window, we will go to “C / C ++ General” -> “Paths and Symbols” page. Let’s select the Includes tab on the right.

** We have to check that the name of the window that opens is “Properties for gisImage”. **

11) In the “Includes” tab, select the “GNU C++” option from the “Languages List” at the bottom left. Then open the “Configuration” section and select the “Debug” option from here. We will see a project in “Include Directories”, click it twice.

12) A record will appear in the window that opened. Select this record completely and copy it. Then press the “Cancel” and exit here.

13) We went back to the previous window. Select “Release” from the “Configuration” at the top. Make sure you have “GNU C ++” selected in “Languages” on the left, click the “Add” button on the right. A new window will open, paste the copied text into the Directory box and click the “OK” button.

14) We are at the last stage now. Click the Apply and Close button of the Properties for gisImage window.     “… Do you wish to rebuild it now?” may be encountered. After saying yes to this, the project will be built.

15) The IDE is ready to code now.