Subject: Re: Building resource-only DLL under Cygwin.
From: Brian Inglis <[email-masked]>
To: [email-masked]
Date: Thu, 20 May 2021 23:09:11 -0600
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.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.]

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