delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/07/18/06:03:13

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7DD773857016
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1689674590;
bh=VDNvwdlucQXSlIHeX7dCFK6lZZS757wQkm+PiJE4wu0=;
h=Date:To:Cc:Subject:In-Reply-To:References:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=BaTyasWzrCY0EY9iA8TXCx5f5/PS8Igp1uxPwySkrybtP4PiwVGHILiD5cXL1CiXR
MWqX5vIr9dZtXtPCiDEowJabS+wAOM7rYnjcZpv7Agv7eHq2vO34cu+NEGf43/21sQ
PjiXvL8FuR+6Wx6fnLRrHGWXpSua017q5SF0c4Kw=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EAA8038582A1
Date: Tue, 18 Jul 2023 19:02:20 +0900
To: cygwin AT cygwin DOT com
Cc: "=?UTF-8?B?TcO8bWlu?= A." <muminaydin06 AT gmail DOT com>
Subject: Re: linking multiple function from .lib to CYGWIN
Message-Id: <20230718190220.f763844e81010d2a945a1764@nifty.ne.jp>
In-Reply-To: <CAPxKPA6Rc2AQ6=zS2HKDr3i7LM7hziTR6NMz5MYqxvzmuZu9ag@mail.gmail.com>
References: <CAPxKPA479BGNumXfytnRwRi_Zbxy0dBxhsLH0G14yBfsdvn5WA AT mail DOT gmail DOT com>
<20230718075310 DOT c14f5d16e87e3fc3a07e05a4 AT nifty DOT ne DOT jp>
<CAPxKPA6Rc2AQ6=zS2HKDr3i7LM7hziTR6NMz5MYqxvzmuZu9ag AT mail DOT gmail DOT com>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 36IA3DOb014009

On Tue, 18 Jul 2023 11:32:53 +0300
Mümin A. wrote:
> Hi,
> 
> Thank you for prompt reply,
> 
> I couldn't find gcc 12 in the cygwin installer. How can I find it?
> 
> And, We are already linking the library dynamically. We have fooCls.dll and
> fooCls.lib files in the project.
> Is there another workaround for this problem?
> 
> Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>, 18 Tem 2023 Sal, 01:53 tarihinde
> şunu yazdı:
> > Perhaps, this is a bug of gcc 11 which has been already fixed in
> > gcc 12.
> >
> > Workaround is:
> > Link .dll directly instead of linking .lib if your .lib is
> > associated with a DLL.
> >
> > --
> > Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

gcc 12 is not ready for cygwin.

I mean, the workaround is:
x86_64-w64-mingw32-g++ main.cpp fooCls.dll
instead of
x86_64-w64-mingw32-g++ main.cpp fooCls.lib

If you use cmake, replace fooCls.lib in your CMakelits.txt
with fooCls.dll.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019