View mode: basic / threaded / horizontal-split · Log in · Help
October 02, 2007
Re: Phobos and Tango deep dependancies
Walter Bright Wrote:
> phobos.lib doesn't have any dependencies on various dll's, except that 
> std.socket pulls in ws2_32. All the dll dependencies come from the C 
> runtime library, snn.lib.
> 
> The only explicitly loaded dll's in snn.lib are kernel32 and user32. Any 
> other dll's are loaded by those dll's, and any dynamically loaded dll's 
> are loaded by those dll's. Not by phobos or snn.
OK. It is much clearer now: it is the C runtime which loads load kernel32 and user32. And as Jascha Wetzel said user32 is the one which brings most of these dependancies.

But why does the C runtime library for DMD requires user32? A simple hello world program compiled using visual 2005 express does not depend on user32!
Is there any way to solve this?
October 02, 2007
Re: Phobos and Tango deep dependancies
"Gilles G." <schaouette@free.fr> wrote in message 
news:fdu60s$2pf6$1@digitalmars.com...
>
> But why does the C runtime library for DMD requires user32? A simple hello 
> world program compiled using visual 2005 express does not depend on 
> user32!
> Is there any way to solve this?

Let me get this straight: you're complaining about a dependency on a DLL 
which every system has.  Aren't there more important things you should be 
worrying about?
October 02, 2007
Re: Phobos and Tango deep dependancies
On Tue, 02 Oct 2007 22:26:20 +0300, Gilles G. <schaouette@free.fr> wrote:

> But why does the C runtime library for DMD requires user32? A simple hello world program compiled using visual 2005 express does not depend on user32!
> Is there any way to solve this?

user32.dll is pulled in because of one import - MessageBoxA. In case that an unhandled exception or other internal error happens, and the application doesn't have a console (or, more precisely, a standard output stream), a message box is shown. This could be remedied by delay-importing it.

-- 
Best regards,
Vladimir                          mailto:thecybershadow@gmail.com
October 03, 2007
Re: Phobos and Tango deep dependancies
Vladimir Panteleev Wrote:
> user32.dll is pulled in because of one import - MessageBoxA. In case that an unhandled exception or other internal error happens, and the application doesn't have a console (or, more precisely, a standard output stream), a message box is shown. This could be remedied by delay-importing it.

*this* is a precious piece of information. It will unfortunately not allow me to solve the problem, but it is a good explanation for the software developer for which I am writing a DLL.

Thank you very much Vladimir.

--
Gilles
Top | Discussion index | About this forum | D home