comp.lang.ada
 help / color / mirror / Atom feed
From: "Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr>
Subject: Re: GNAT 2009, Windows and system libraries
Date: Wed, 10 Feb 2010 03:40:25 -0800 (PST)
Date: 2010-02-10T03:40:25-08:00	[thread overview]
Message-ID: <c6539238-da34-4e3e-9476-46e778c7bc10@l19g2000yqb.googlegroups.com> (raw)
In-Reply-To: 690a26b0-70fd-4d0c-8169-fe803594938d@z17g2000yqh.googlegroups.com

On 10 fév, 12:13, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
> I have a problem writing a proper .gpr file for a project that is
> composed of Ada and C++ code and that uses Windows socket API.
> I have no problem linking Ada with the C++ library, the problem is
> with system library known as Ws2_32.lib.
>
> When compiling a similar project with a C++ compiler, it is enough to
> add Ws2_32.lib to the compiler invocation command and it just works.
> I cannot, however, find a proper way of doing it with Ada projects.

Forgive me if it ever does not fulfill your requirements (you may want
to rely on GPR project files only), here is how I do when I need this
kind of linkage : I put some pragma Linker_Options ("-lkernel32");
pragma Linker_Options ("-lwsock32"); in the private part of
specification files.

Notice the "-l" as a prefix and the lack of any "-Wl,"

If you opt for this solution, make sure you put this in a
specification file which is required by all package which depends on
it (a root package is a good place).



  reply	other threads:[~2010-02-10 11:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 11:13 GNAT 2009, Windows and system libraries Maciej Sobczak
2010-02-10 11:40 ` Hibou57 (Yannick Duchêne) [this message]
2010-02-10 15:21 ` Maciej Sobczak
2010-02-10 15:35   ` Maciej Sobczak
2010-02-10 15:45     ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox