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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f0bea306882c2a15 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Problem referencing library file via project file Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Sat, 30 Apr 2011 10:34:41 +0200 Message-ID: NNTP-Posting-Date: 30 Apr 2011 10:34:40 CEST NNTP-Posting-Host: 993f20d6.newsspool1.arcor-online.net X-Trace: DXC=95=9ghdKbi9T2Rfi64Fo<]lROoR1<`=YMgDjhg2fcXS1NNXb[:[6LHn;2LCV>[ On Sat, 30 Apr 2011 09:15:34 +0100, Robert Matthews wrote: > I am trying to link the webkit library file with my program. > One way that works is to use: > > pragma Linker_Options ("-lwebkit-1.0"); > > in my source file. > > However I would like to specify this in the program's > project file. I have tried: > > package Linker is > for Default_Switches ("ada") use ("-lwebkit-1.0"); > end Linker; > > but this seems to be ignored - I just get undefined > reference messages from gnatlink. Please help! I would recommend always refer external non-Ada libraries as proper library projects rather than a bunch of linker options. In your case it could be: webkit.gpr: --------------------------------------------------- project WebKit is for Externally_Built use "true"; for Source_Files use (); for Library_Dir use "/usr/lib"; -- Or whatever location it has for Library_Name use "webkit-1.0"; for Library_Kind use "dynamic"; end WebKit; ------------------------------------------------- and then in your project you just "with" it: with "webkit.gpr"; Gprbuild and gprmake would do the rest. P.S. I would make this packaging policy for all Ada distributions. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de