From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: <cygwin@cygwin.com>
Cc: "Carlo B." <carlo.bramini@gmail.com>
Subject: Re: Bug in CYGWIN's UUID library: GUID_NULL not found.
Date: Tue, 21 Feb 2023 01:01:15 +0900 [thread overview]
Message-ID: <20230221010115.fd534a355dfcb53bd95c0a57@nifty.ne.jp> (raw)
In-Reply-To: <CADt95757Eqp3z7rVD9s0nyjYKri52+G8LQ4R_afu7Hu7piafLg@mail.gmail.com>
On Mon, 20 Feb 2023 16:48:50 +0100
"Carlo B. wrote:
> Hello,
> I think that there is a bug into the uuid library, the one to be used
> with the W32API for the POSIX core.
> Please have a look to the following tiny test code:
>
> //====================
> #include <windows.h>
> #include <initguid.h>
> #include <ks.h>
> #include <stdio.h>
>
> int main()
> {
> printf("GUID_NULL=\"%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X\"\n",
> GUID_NULL.Data1,
> GUID_NULL.Data2, GUID_NULL.Data3,
> GUID_NULL.Data4[0], GUID_NULL.Data4[1],
> GUID_NULL.Data4[2], GUID_NULL.Data4[3],
> GUID_NULL.Data4[4], GUID_NULL.Data4[5],
> GUID_NULL.Data4[6], GUID_NULL.Data4[7]
> );
>
> return 0;
> }
> //====================
>
> Compiling it with x86_64-pc-cygwin or i686-pc-cygwin does not work:
>
> $ gcc e.c -o e.exe -luuid
> /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld:
> /tmp/ccyJK3d9.o:e.c:(.rdata$.refptr.GUID_NULL[.refptr.GUID_NULL]+0x0):
> undefined reference to `GUID_NULL'
> collect2: error: ld returned 1 exit status
You linked /usr/lib/libuuid.dll.a rather than /usr/lib/w32api/libuuid.a.
You might want: gcc e.c -o e.exe -L/usr/lib/w32api -luuid
--
Takashi Yano <takashi.yano@nifty.ne.jp>
next prev parent reply other threads:[~2023-02-20 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 15:48 Carlo B.
2023-02-20 16:01 ` Takashi Yano [this message]
2023-02-20 16:12 ` Carlo B.
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=20230221010115.fd534a355dfcb53bd95c0a57@nifty.ne.jp \
--to=takashi.yano@nifty.ne.jp \
--cc=carlo.bramini@gmail.com \
--cc=cygwin@cygwin.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).