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,90504b78c9e015b1,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!1g2000vbm.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Linking with GNAT on Windows Date: Tue, 24 Nov 2009 08:26:00 -0800 (PST) Organization: http://groups.google.com Message-ID: <0ac0e003-176f-48d1-b72f-56f81dae922e@1g2000vbm.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 1259079960 2827 127.0.0.1 (24 Nov 2009 16:26:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 24 Nov 2009 16:26:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 1g2000vbm.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.5) Gecko/20091102 Firefox/3.5.5,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8224 Date: 2009-11-24T08:26:00-08:00 List-Id: Hi, Imagine a C library compiled with Visual Studio. This library is used by an Ada program by means of pragma Import. When the C library is compiled in the Debug mode, GNAT can link the whole program. If the same C library is compiled in the Release mode, the GNAT linker says "undefined reference" with regard to the C function that is imported by Ada. I am pretty sure that people who are regularly targetting the Windows platform have seen that already and could possibly help with a hint (compiler/linker option on the Visual Studio side?) on how to proceed. All suggestions are welcome. This is GNAT 2009 and Visual Studio 2008. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada