Chapter 36. GPS Project Files

After installation of the GNADE components a typical project file for a project using embedded SQL is shown below:

with "gnade";
project Nobel is

   for Languages use ("Ada");
   for Source_Dirs use (".");
   for Object_Dir use ".";
   for Main use ("nobel_co.adb" );

   for Exec_Dir use ".";

   package Linker is
      for Default_Switches ("ada")
      use ("-g", LibOpt, "-lgnadeaux", "-lgnadeodbc",
           "-L" & gnade.DMLOC,
           "-l" & gnade.DMLIB );
   end Linker;

   package Binder is
      for Default_Switches ("ada") use ("-static");
   end Binder;

   package Compiler is
      for Default_Switches ("ada") use ("-g", GNADE.IncludeOPT );
   end Compiler;

   package Builder is
      for Default_Switches ("ada")
      use ("-s", "-m", "-g", "-gnatQ", GNADE.IncludeOPT);
   end Builder;

   package Ide is
      for Vcs_Kind use "CVS";
   end Ide;

end Nobel;
  

Most of the common defintions are taken from the common GNADE project files. If your are developing a pure ODBC Option it will be sufficient to execute "Build" "Make" "Project" from the GPS Menu.

If you are developing SW involving the esql translator a preprocessing run on the embedded SQL source is needed before compiling the source. Unfortunatly the GPS does not allow to execute preprocessor runs. Therefore you have to rely on a Makefile doing the job. This can be done by means of "Build" "Make" "Custom Make".