GEOS-SC : Tutorial : Sections : Using an Existing Sample Application

Introduction | The Development Environment | Using an Existing Sample Application | Creating a Simple Application


The GEOS-SC SDK comes with several sample applications. GEOS-SC is a single executable, GeosSC.exe. GEOS-SC applications are modules (pieces of code) which can be linked into the executable at build-time. By default, most sample applications won't be linked in. To run a sample application, you must tell the development tools to compile and link it.

To compile and link a sample application:

  1. Load the GEOS-SC Workspace.
  2. Include sample application in the build.
  3. Build the GeosSC.exe executable.
  4. Execute GeosSC.exe.

Load the GEOS-SC workspace (GeosSC.dsw) by selecting GEOS-SC Workspace from the GEOS-SC SDK program group in the Start menu.

[Start menu screen image]

Choosing GEOS-SC Workspace launches Microsoft Visual C++. You can also open this workspace in Microsoft Visual C++ by choosing Open Workspace from the File menu and selecting GeosSC.dsw.


Include the sample application in the build by removing the ": Inactive" directive. This tells the build program to compile and link the application into GeosSC.exe in the next build.

  1. In Visual C++, open the GEOS-SC top-level jamfile.

  2. In the Jamfile, look for the line referring to the sample application, in this case hello. Remove the ": Inactive" directive:

    ...
    Module appl samples graphics images             : Inactive ;
    Module appl samples graphics logoapp            : Inactive ;
    Module appl samples graphics stockgph           : Inactive ;
    Module appl samples hello ;
    Module appl samples input inkinput              : Inactive ;
    ...
    


To build the executable, select Build GeosSC.exe from the Build menu, or click on the Build button.


To execute, select Execute GeosSC.exe from the Build menu, or click on the Execute Program button.

You may have linked in more than one sample application. To switch between applications in the emulator, press the F1 key and use the dialog box which appears.

Now you can see your sample application:


Introduction | The Development Environment | Using an Existing Sample Application | Creating a Simple Application