Web lists-archives.com

Re: [Mingw-users] Dependency on libgcc_s_dw2-1.dll

On  Fri, 18 Sep 2015 09:53:37 +0300, Eli Zaretskii wrote:
> [Please don't take this to private mail.]

Sorry about that. Normally when I reply, Outlook.com sends the response
to the list, but its behaviour seems to have changed. Now I have to 'Reply
All' and delete your private address.

>> I don't understand. Why does gcc care who calls my C-language DLL?
> If the DLL you build will throw exceptions, not linking against shared
> libgcc will prevent those exceptions from being thrown and caught by
> other DLLs. GCC cannot know whether the applications or DLLs you are
> building expect that.

But I am not throwing exceptions, and if this behaviour is to prevent a
disaster that may or may not happen, why doesn't it do it all the time?

>> If my DLL (which neither catches nor throws C++ exceptions)
> (I don't think only C++ exceptions are affected. Windows supports
> exceptions in C code as well.)

It is true that when I build libThis and libThat I don't know whether they 
implement Windows Structured Exception Handling or not unless I inspect
the source. I consider it unlikely though.

>> is called by a C++ module, then let *that* module link to
>> libgcc_s_dw2.dll if it catches or throws exceptions.
> You need both the throwing and the catching code to link against the
> shared libgcc.


> In any case, if you don't want the libgcc DLL dependency, and don't
> want to link against libgcc statically, what other options did you
> expect to exist?

I was hoping to avoid linking this (what I consider to be a) C++ DLL to my
C modules whether statically or dynamically, because I am not  (explicitly)
calling any functions in it. Of course, if the default action were to link statically,
I wouldn't have known that it was happening and I would have continued in
blissful ignorance.

Now that I know, I can follow your suggestion, but does it have any GPL

John Brown.

MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe