From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,680db47cb70ed728 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Sun, 26 Jun 2005 08:25:10 -0500 Newsgroups: comp.lang.ada Subject: Re: GNAT Project Files? References: From: Ludovic Brenta Date: Sun, 26 Jun 2005 15:24:27 +0200 Message-ID: <87d5q9b69g.fsf@insalien.org> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:Y2xdpiZO7GRWz9Yf4anjGH/RoSU= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 83.134.238.190 X-Trace: sv3-ZYc+D/5psJwkBeyN1JnIx3xGebr+LwetHEiT/njPYfaWO3veoPcGtxcwoAP97ChWqN97b4dqCHU+roM!vijB521OSYBJx6bCMDugxEIfHwGFX9p+ktM9MQkZ7cehMe4y1LUnyKKPCce7+LCNguk= X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:11669 Date: 2005-06-26T15:24:27+02:00 List-Id: Pascal Obry writes: > Jacob Sparre Andersen writes: > >> ----- >> with "/usr/share/ada/adainclude/xmlada.gpr"; >> project AWS is >> for Source_Dirs use ("/usr/share/ada/adainclude/aws"); >> for Object_Dir use "/usr/lib/ada/adalib/aws"; >> Ada_Switches := "-laws"; >> package Linker is >> for Default_Switches ("Ada") use (Ada_Switches); >> end Linker; >> end AWS; >> ----- > > This project is not a library project and not a project file coming > from the AWS project. So with this project you need to pass the > library option to the linker yourself. Please have a look at the > Library Project file and how this is handled in AWS. AWS has also > Library Project to support external libraries like the one for > OpenSSL. Which such an achitecture you just need to add into your > own project file: > > with "aws"; > > And that's all. If you want SSL support you can use : > > with "aws_ssl"; > > Pascal. Pascal, you are correct. The project file that I supply as part of libaws (2.0p) is not a library project file. The reason for this is that GNAT 3.15p does not support library project files. Hence, Jacob needs to specify a linker option in his project file, like so: with "/usr/share/ada/adainclude/aws"; with "/usr/share/ada/adainclude/charles"; with "/home/sparre/Ada/Pakker/Strenge/string_arrays"; with "/home/sparre/Ada/Programmer/CGI/Ordlisten/get_random_words"; project Test_Word_Buffer is for Object_Dir use "."; for Exec_Dir use "."; for Main use ("test_word_buffer"); package Linker is for Default_Switches ("Ada") use (AWS.Ada_Switches, Charles.Ada_Switches, -- linker switches from String_Arrays and Get_Random_Words ); end Linker; end Test_Word_Buffer; This is explained in the comments in aws.gpr, which Jacob mistakenly omitted to read, it seems: -- Ada Web Server project file for use with GNAT 3.15p -- Copyright (c) 2004 Ludovic Brenta -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- This project file is designed to help build applications that use -- Ada Web Server. Here is an example of how to use this project file: -- -- with "/usr/share/ada/adainclude/aws"; -- project Example is -- for Object_Dir use "obj"; -- for Exec_Dir use "."; -- for Main use ("example"); -- package Linker renames AWS.Linker; -- -- Alternatively, if you need additional switches: -- -- package Linker is -- -- for Default_Switches ("Ada") use (AWS.Ada_Switches & ...) -- -- end Linker; -- end Example; with "/usr/share/ada/adainclude/xmlada.gpr"; project AWS is for Source_Dirs use ("/usr/share/ada/adainclude/aws"); for Object_Dir use "/usr/lib/ada/adalib/aws"; Ada_Switches := "-laws"; package Linker is for Default_Switches ("Ada") use (Ada_Switches); end Linker; end AWS; This is also explained in the Debian Policy for Ada: http://www.ada-france.org/debian/debian-ada-policy.html -- Ludovic Brenta.