X-Recipient: archive-cygwin@delorie.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@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EAA8038582A1
Date: Tue, 18 Jul 2023 19:02:20 +0900
To: cygwin@cygwin.com
Cc: "=?UTF-8?B?TcO8bWlu?= A." <muminaydin06@gmail.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@mail.gmail.com>
 <20230718075310.c14f5d16e87e3fc3a07e05a4@nifty.ne.jp>
 <CAPxKPA6Rc2AQ6=zS2HKDr3i7LM7hziTR6NMz5MYqxvzmuZu9ag@mail.gmail.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@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin@cygwin.com>
Reply-To: Takashi Yano <takashi.yano@nifty.ne.jp>
Content-Type: text/plain; charset="utf-8"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
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.yano@nifty.ne.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.yano@nifty.ne.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.yano@nifty.ne.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

