mingw status

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Mon Feb 20 21:01:04 CET 2006


Thiago Macieira schrieb:
> Peter Kümmel wrote:
>>>> But this we have to discuss with the khtml people.
>>> You don't have to. This will never happen.
>> We don't have to change any kjs code.
>>
>>> KJS can't link to Qt.
>> Even not in our cmake files?
>> It's a KDE only solution.
> 
> No. libkjs is not supposed to link to Qt.
> 
>>> By design, this one function must be declared in another library.
>> I don't understand.
>> Currently it's declared in kjs and defined in khtml.
> 
> That's the idea. That's how it's supposed to be.
> 
> The function is declared as a constructor in the class. But it's 
> implemented only by the libraries that integrate libkjs to Qt, since KJS 
> doesn't link nor will link to Qt.
> 
> The workaround would be to remove the constructor completely and use a 
> non-member function to convert from QString to UString. Or another class 
> that derives from UString (call it VString) and has this constructor.
> 
>> The problem when compiling khtml is that some files of khtml
>> include ustring.h and get the info UString::UString(const QString&)
>> is somewhere in a dll, but this constructor is implemented in by khtml
>> itself, so you get linker errors.
> 
> Which is only a problem on Win32. This code has existed for 5 years or 
> more and this no one has ever complained.
> 
>> A other solution could be to move the khtml-ustring implementation into
>> a mini-dll.
>>
>> Maybe I've overlooked the simples solution: Could I declare a single
>> member function with a other linkage as the rest of the class?
> 
> Yes: you can declare a single member function to have linkage different 
> from the rest of the class. That's what we've been doing all along in 
> KJS.
> 
> It's just that the Win32 COFF PE executable format doesn't support this. 
> It's an all or nothing. ELF implements it correctly, because there is 
> only one symbol pool (the global one) and any symbol can be defined 
> anywhere, just as if the program had been statically linked.
But ths should work:

class foo {
  KDE_EXPORT foo();
  myFunction();
}

Then only the constructor is exported when I'm correct.

Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060220/3be453b4/attachment-0001.pgp 


More information about the Kde-buildsystem mailing list