public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Building resource-only DLL under Cygwin.
Date: Thu, 20 May 2021 23:09:11 -0600	[thread overview]
Message-ID: <91e8ffc7-087d-24f4-67ae-13e0c49fab1d@SystematicSw.ab.ca> (raw)
In-Reply-To: <3ca48702525e10e74147067d20bd4532@mail.kylheku.com>

On 2021-05-20 18:33, Kaz Kylheku via Cygwin wrote:
> I was just wondering; have any of you ever tried to build a resource-only DLL using the Cygwin toolchain environment?
> 
> I mean, starting with a .rc file, build a .res, and then link it into a working resource-only DLL?
> 
> I know that adding resources to executables is perfectly possible; I'm specifically asking about resource-only DLLs.
> 
> If you use Microsoft's tools, you must specify the /NOENTRY linker option to indicate that the object has no DllMain.
> 
> Can we do the analog of this with the GNU-based toolchain on Cygwin?

Not done it - but should be doable - normal MS approach to L14N.

 From the links near the bottom, it looks like if you want or need a DllMain,
you have to write and build it, as would be expected, so just don't do that!

See what mintty and setup do with their resources in their build processes:

<https://github.com/mintty/mintty/blob/master/src/res.rc>
<https://github.com/mintty/mintty/blob/master/src/Makefile#L159>

<https://cygwin.com/git/?p=cygwin-apps/setup.git;a=blob;f=res.rc>
<https://cygwin.com/git/?p=cygwin-apps/setup.git;a=blob;f=Makefile.am#l275>

See man dlltool(1), windres(1),
<https://cygwin.com/cygwin-ug-net/dll.html#dll-build>
<https://www.transmissionzero.co.uk/computing/building-dlls-with-mingw/>
<https://www.transmissionzero.co.uk/computing/advanced-mingw-dll-topics/>
<https://www.transmissionzero.co.uk/computing/win32-apps-with-mingw/>

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

      reply	other threads:[~2021-05-21  5:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  0:33 Kaz Kylheku
2021-05-21  5:09 ` Brian Inglis [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=91e8ffc7-087d-24f4-67ae-13e0c49fab1d@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --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).