public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Building resource-only DLL under Cygwin.
@ 2021-05-21  0:33 Kaz Kylheku
  2021-05-21  5:09 ` Brian Inglis
  0 siblings, 1 reply; 2+ messages in thread
From: Kaz Kylheku @ 2021-05-21  0:33 UTC (permalink / raw)
  To: cygwin

Hi all!

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?

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Building resource-only DLL under Cygwin.
  2021-05-21  0:33 Building resource-only DLL under Cygwin Kaz Kylheku
@ 2021-05-21  5:09 ` Brian Inglis
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Inglis @ 2021-05-21  5:09 UTC (permalink / raw)
  To: cygwin

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.]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-21  5:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21  0:33 Building resource-only DLL under Cygwin Kaz Kylheku
2021-05-21  5:09 ` Brian Inglis

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).