[AWS] Odd time trying to build a working AWS.

Joey Fish onewingedshark at gmail.com
Wed Jun 13 20:55:19 CEST 2012


Looking on Stack-overflow I saw a minimal AWS example and integrated it
into my test program as the Version subprogram, when I commented out the
indicated portions I got a clean compile and run. (Source below)

I remember Pascal saying something about a zlib incompatibility, and given
that most of the linker errors involve zlib that is likely the issue:
aws-net-poll_events.o    undefined reference to `poll'
aws-net.o        undefined reference to `socket_strerror'
zlib-thin.o        [ 3 entries]
zlib.o                [11 entries]
There are some concerns about 'poll' and 'socket_strerror'



with Ada;
use Ada;

With Ada.Text_IO;


with GNAT.IO;  use GNAT.IO;

With AWS
-- Comment out the following line for a correct compile
    , AWS.Server, AWS.Status, AWS.Response
;

Procedure Test is

-- comment out Hello_World if AWS.Server is commented out.
    procedure Hello_World is
    WS:AWS.Server.HTTP;
    function HW_CB(Request: in AWS.Status.Data)
           return AWS.Response.Data is
        URI: constant String:=AWS.Status.URI(Request);
    begin
        if URI="/hello" then
        return AWS.Response.Build("text/html","<p>Helloworld!");
        else
        return AWS.Response.Build("text/html","<p>Hum...");
        end if;
    end HW_CB;

    begin
    AWS.Server.Start
      (WS,"HelloWorld",Callback=>HW_CB'Unrestricted_Access);
    delay 30.0;
    end Hello_World;

    procedure Version is
    begin
       Ada.Text_IO.Put_Line ("AWS version is " & AWS.Version);
    end Version;


begin
   null;
   Put_Line( "Testing" );
--    Hello_World;
    Version;
end Test;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/aws/attachments/20120613/d13b8669/attachment.htm 


More information about the AWS mailing list