[AWS] "Services" is not visible

Norbert Crettol norbert.crettol at idiap.ch
Tue May 1 15:29:20 CEST 2007


Hello,

I'm trying to understand how to compile a aws project.

I'm using the Ubuntu gnat packages as follows :
nc at milarepa:~/src/ada/aws$ dpkg -l | grep gnat
ii  gnat-4.1                                   4.1.2-0ubuntu4       The 
GNU Ada compiler
ii  gnat-4.1-base                              4.1.2-0ubuntu4       The 
GNU Compiler Collection (gnat base packa
ii  gnat-4.1-doc                               4.1.2-0ubuntu4       
Documentation for the GNU Ada compiler (gnat
ii  libgnat-4.1                                4.1.2-0ubuntu4       
Runtime library for GNU Ada applications
ii  libgnatprj4.1                              4.1.2-0ubuntu4       GNU 
Ada Project Manager
ii  libgnatvsn4.1                              4.1.2-0ubuntu4       GNU 
Ada compiler version library

and Ubuntu aws package :
nc at milarepa:~/src/ada/aws$ dpkg -l | grep aws
ii  libaws-bin                                 2.2dfsg-1       Ada Web 
Server utilities
ii  libaws-dev                                 2.2dfsg-1       Ada Web 
Server development files
ii  libaws-doc                                 2.2dfsg-1       Ada Web 
Server documentation
ii  libaws2.2                                  2.2dfsg-1       Ada Web 
Server shared library

My environment contains :
nc at milarepa:~/src/ada/aws$ echo $ADA_INCLUDE_PATH
/usr/share/ada/adainclude
nc at milarepa:~/src/ada/aws$ echo $ADA_OBJECTS_PATH
/usr/lib/ada/adalib

My code is (from the examples) :
--------------------------------------------------
with AWS.Response;
with AWS.Server;
with AWS.Status;

procedure Hello_World is
   WS : AWS.Server.HTTP;

   function Service (Request : in AWS.Status.Data) return 
AWS.Response.Data is
   begin
      return AWS.Response.Build ("text/html","<p>Hello World !");
   end Service;

begin
   AWS.Server.Start (WS, "Hello World",
                     CallBack=>Service'Unrestricted_Access);
   AWS.Server.Wait (AWS.Server.Q_Key_Pressed);
end Hello_World;
--------------------------------------------------

I try to compile as follows :

nc at milarepa:~/src/ada/aws$ gnatmake -A/usr/share/ada/adainclude/aws 
-A/usr/share/ada/adainclude/templates_parser -gnatc hello_world
gcc-4.1 -c -I./ -I/usr/share/ada/adainclude/aws 
-I/usr/share/ada/adainclude/templates_parser -gnatc -I- 
/usr/share/ada/adainclude/aws/aws-server.adb
aws-server.adb:626:07: "Services" is not visible (more references follow)
aws-server.adb:626:07: non-visible declaration at aws-services.ads:23
gnatmake: "/usr/share/ada/adainclude/aws/aws-server.adb" compilation error

Do I make an error with the gnatmake switches ? Can
someone give me a hint ?

Thanks in advance.

Regards

Norbert



More information about the AWS mailing list