public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Cc: "Mümin A." <muminaydin06@gmail.com>
Subject: Re: linking multiple function from .lib to CYGWIN
Date: Tue, 18 Jul 2023 19:02:20 +0900	[thread overview]
Message-ID: <20230718190220.f763844e81010d2a945a1764@nifty.ne.jp> (raw)
In-Reply-To: <CAPxKPA6Rc2AQ6=zS2HKDr3i7LM7hziTR6NMz5MYqxvzmuZu9ag@mail.gmail.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 <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>

      parent reply	other threads:[~2023-07-18 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  8:51 Mümin A.
2023-07-17 22:53 ` Takashi Yano
     [not found]   ` <CAPxKPA6Rc2AQ6=zS2HKDr3i7LM7hziTR6NMz5MYqxvzmuZu9ag@mail.gmail.com>
2023-07-18 10:02     ` Takashi Yano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230718190220.f763844e81010d2a945a1764@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin@cygwin.com \
    --cc=muminaydin06@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).