public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Csaba Raduly <rcsaba@gmail.com>
To: cygwin list <cygwin@cygwin.com>
Subject: Re: How does linker choose library with same function export?
Date: Sun, 20 Oct 2019 09:15:00 -0000	[thread overview]
Message-ID: <CAEhDDbC9eOzZOhfYCvOoN0zpOkK9C4rr+GmvT1pb=1SLiVFbGQ@mail.gmail.com> (raw)
In-Reply-To: <CALK-3m+4wh7eD5KyXAVAT7xYp=nhC9u=vzyOokS41U1GeVKWWQ@mail.gmail.com>

Hi,

On Sat, Oct 19, 2019 at 2:57 PM Biswapriyo Nath  wrote:
>
> I want to use socket() from ws2_32.dll file. But cygwin1.dll also has that
> export. When I use `-lws2_32` option, will gcc **always** choose
> ws2_32.lib? My query is somewhat similar with FAQ #5.11.

I think the FAQ is pretty clear:

"5.11.

I don't want Unix sockets, how do I use normal Win32 winsock?

You don't. "


You shouldn't look at Cygwin programs as if they were Windows programs.
Cygwin is a POSIX environment.
You either create a Cygwin program and use the POSIX functions,
or you create a Windows program (you can cross-compile Windows programs
under Cygwin).
Mixing the two is likely to run into problems, and you aren't going to
get much help
when you were told "don't do it" at the very beginning.

Csaba
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2019-10-20  9:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19 12:56 Biswapriyo Nath
2019-10-20  9:15 ` Csaba Raduly [this message]
2019-10-20  9:40   ` Thomas Wolff

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='CAEhDDbC9eOzZOhfYCvOoN0zpOkK9C4rr+GmvT1pb=1SLiVFbGQ@mail.gmail.com' \
    --to=rcsaba@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).