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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,1d2fc55e2c7a55b6,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z17g2000yqh.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: GNAT 2009, Windows and system libraries Date: Wed, 10 Feb 2010 03:13:11 -0800 (PST) Organization: http://groups.google.com Message-ID: <690a26b0-70fd-4d0c-8169-fe803594938d@z17g2000yqh.googlegroups.com> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1265800391 18944 127.0.0.1 (10 Feb 2010 11:13:11 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 10 Feb 2010 11:13:11 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z17g2000yqh.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:9073 Date: 2010-02-10T03:13:11-08:00 List-Id: 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. This is my try (Ws2_32.gpr): project Ws2_32 is for Externally_Built use "true"; for Source_Dirs use (); for Library_Dir use "C:\Program Files\Microsoft SDKs\Windows\v6.0A \Lib"; for Library_Name use "Ws2_32"; for Library_Kind use "dynamic"; end Ws2_32; This .gpr file is "withed" by the project file of the final Ada program. This approach works for my own libraries, but is ineffective with the system library and gnatlink reports zillions of unresolved references. Any feedback is welcome. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com