Subject: Re: linking multiple function from .lib to CYGWIN
From: Takashi Yano via Cygwin <[email-masked]>
To: [email-masked]
Cc: "Mümin A." <[email-masked]>
Date: Tue, 18 Jul 2023 19:02:20 +0900
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>

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 <[email-masked]>, 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 <[email-masked]>

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 <[email-masked]>

-- 
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