comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: Linking with GNAT on Windows
Date: Wed, 25 Nov 2009 04:47:24 -0800 (PST)
Date: 2009-11-25T04:47:24-08:00	[thread overview]
Message-ID: <8aed937b-b11f-422a-95d3-5fb5d7645e39@b15g2000yqd.googlegroups.com> (raw)
In-Reply-To: 1tz8hsohppx0j.1sqxhytef0t79.dlg@40tude.net

On 25 Lis, 10:46, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:

> Usually debug/release versions have different names like mylibraryd.lib or
> else placed into different subdirectory like .\Debug vs. .\Release. What
> about the "-L" switch?

If the file was not found, the linker would say so. Every -lmylibrary
option must have a corresponding library file.

> I think you should:
>
> 1. Remove all instances of mylibrary.lib.
> 2. Build it anew.
> 3. Ensure that GNAT links the library you have built.
> 4. If error persists, view the lib file. Compare names there and the
> unresolved references reported by GNAT.

Well, no. :-)
As already said, this is the interaction between Visual Studio and
MinGW, so can be completely reproduced outside of GNAT.

The problem proved to be related to the Visual optimization option
that is used to enable so-called whole-program optimization (Enable
link-time code generation). On command-line this is /GL option.

This option must be switched off. I hope this observation will help
other programmers.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada



  reply	other threads:[~2009-11-25 12:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-24 16:26 Linking with GNAT on Windows Maciej Sobczak
2009-11-24 17:34 ` Dmitry A. Kazakov
2009-11-24 18:03   ` Pascal Obry
2009-11-25  1:36     ` Kevin K
2009-11-25  8:43   ` Maciej Sobczak
2009-11-25  9:46     ` Dmitry A. Kazakov
2009-11-25 12:47       ` Maciej Sobczak [this message]
2009-11-25 13:44         ` Dmitry A. Kazakov
replies disabled

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