Michael Gerz wrote:

> Beck, Andrew Thomas - BECAT001 wrote:
> 
>> Don't take it personally, but I actually prefer dynamic linking of
>> stuff that is clearly an external library. Especially since it's
>> used by a few things. What's the drama with linking it dynamically? I
>> suspect it might improve link time/memory somewhat.
>>
> Well, linking dynamically with qtwin and MinGW is so extraordinary
> sloooooooooooow. (takes hours and an infinite amount of memory)

Right. But almost the same time as the static build for both me and for
Abdel. IMO, you just got lucky with your machine ;-)

> If Abdel is right and qt 4.1 links very fast with MinGW, then qtwin is
> to blame. Abdel, what do you mean by forward declarations? Do you think
> we can improve link times by modifying the qtwin sources? I am asking
> because we had a very good cooperation with Christian Ehrlicher, the
> maintainer of qtwin, in the past. Maybe he can help us improving the
> situation.

Not here I'm afraid. The goal of the Qt/Win project was to add the missing
foo_win.cpp files to the source tree in place of the foo_unix.cpp files
that they already had in the GPL-ed, official Qt3 library. There's no way
they would, or should, start hacking the header files. They'd no longer be
porting the GPL-ed Qt to Windows. They'd be writing a new library.

As for, "what do you mean by forward declarations", here's an example:

bar.h:
class Foo;

class Bar {
public:
    Foo make_foo();
};

bar.cpp:
#include "bar.h"
#include "foo.h"

Foo Bar::make_foo()
{
    return Foo();
}

Note how the bar.h header file forward declares "class Foo;" rather than
including foo.h (which it could have done instead). Qt3 tends to forward
declare a lot less stuff than Qt4. However, that tends to increase compile
times, not link times. The Qt4 link improvements probably lie elsewhere.

Angus



-- 
Angus

Reply via email to