public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* About DLL compilation problem
@ 2021-09-03 16:10 Ricardo Santos Pereira
  0 siblings, 0 replies; only message in thread
From: Ricardo Santos Pereira @ 2021-09-03 16:10 UTC (permalink / raw)
  To: cygwin

Hi Corina

just figured out that a .def file in a dll may export function from a dll
that is referenced in the compilation stage like this:

gcc file.c external.dll def.def -o out.dll

if in the def.def it has a function that is in the file.c and also
available in external.dll it may generate an invalid out.dll

I don't know but this looks like a problem in gcc that need to be fixed,
spend one hour modifying my function in file.c and it was linking with
external.dll

then I commented the function inside file.c and saw the compilation stage
finished without a link error

if it is a GCC feature then a warning about expernal DLL linkage could help
a lot when the function exported is inside an external DLL

hope to have explained it in an easy way

Ricardo

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-03 16:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03 16:10 About DLL compilation problem Ricardo Santos Pereira

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