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 07:53:10 +0900 [thread overview]
Message-ID: <20230718075310.c14f5d16e87e3fc3a07e05a4@nifty.ne.jp> (raw)
In-Reply-To: <CAPxKPA479BGNumXfytnRwRi_Zbxy0dBxhsLH0G14yBfsdvn5WA@mail.gmail.com>
On Fri, 14 Jul 2023 11:51:59 +0300
Mümin A. wrote:
> Hi,
>
> I can only link one function at a time in a *msvc *built library but when I
> use multiple functions in the CYGWIN
> compiler, I got that error message.
>
> int main()
> {
> helloWorld2();
> return 0;
> }
>
> That is compiled and linked successfully.
>
> int main()
> {
> helloWorld2();
> helloWorld3();
> return 0;
> }
>
> That is compiled but linking throws a bug report.
>
> [ 50%] Linking CXX executable a.exe
> /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld:
> internal error: aborting at
> /mnt/share/cygpkgs/binutils/binutils.x86_64/src/binutils-2.40/ld/ldlang.c:527
> in compare_section
> /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld:
> please report this bug
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>
next prev parent reply other threads:[~2023-07-17 22:53 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 [this message]
[not found] ` <CAPxKPA6Rc2AQ6=zS2HKDr3i7LM7hziTR6NMz5MYqxvzmuZu9ag@mail.gmail.com>
2023-07-18 10:02 ` Takashi Yano
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=20230718075310.c14f5d16e87e3fc3a07e05a4@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).