How to set the QT_DLL macro?

Ralf Habacker ralf.habacker at freenet.de
Fri Apr 22 18:34:15 CEST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Angus Leeming schrieb:

> Ralf Habacker wrote:
>
>> On Friday 22 April 2005 13:32, Angus Leeming wrote:
>>
>>> Angus Leeming wrote:
>>>
>>>>> On cygwin I'm using the following switch, which may help to
>>>>> prevet seg faults. It requires a relink of the qt-3.dll
>>>>> QMAKE_LFLAGS =
>>>>> -Wl,--script,$(QTDIR)/mkspecs/cygwin-g++/i386pe.x-no-rdata
>>>>
>>>> Now that is very, very interesting. I'll try it out. (Am I
>>>> correct to say that only the dll needs to be re-linked?
>>>
>>> Hi, Ralf.
>>>
>>> I have some good news and some bad news to report.
>>>
>>> a cross-compiled LyX/Win 1.3.x runs beautifully on Windows, but
>>> only when I use a natively compiled qt3.dll. If I try and use
>>> the cross-compiled qt3.dll, then I get the dreaded popup "The
>>> application failed to initialise itself correctly".
>>
>>> This is true both with a qt3.dll using the 'standard' linker
>>> options
>>>
>>> QMAKE_LFLAGS = -Wl,-enable-stdcall-fixup
>>> -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
>>>
>>> and when I add your script:
>>>
>>> QMAKE_LFLAGS =
>>> -Wl,--script,$(QTDIR)/mkspecs/cygwin-g++/i386pe.x-no-rdata
>>> -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import
>>> -Wl,-enable-runtime-pseudo-reloc
>
>
> I see from your other reply that this would not have worked anyway,
> because I did not use the script when linking lyx.exe.
>
I just tried to relink the cross compiled qt3dll and the qt tools
(designer/assistant/linguist) with the above mentioned QMAKE_LFLAGS
and got they running under windows without any problems. (The
x-no-rdata file is very important)
If you can build at least linguist or assistant and it will run under
windows with the cross compiled qt3.dll and you got any seg faults,
the qt dll will probably not the problem.

>> It is interesting that the problem is really the dll and not in
>> the exe. Seems that there is a seg fault in the dll startup code.
>> Very difficult to catch, because it is not clear from which part
>> this comes. It may be a mingw provided static lib or the mingw
>> runtime library. (Do have used the mingw runtime dll from the
>> cross compile package ?)
>
>
> No, everything else is native Windows. Only lyx.exe and qt3.dll
> were produced by cross compilation.
>
>> If you have time you can try to profile the application with
>> depends http://www.dependencywalker.com/. It may give some hints
>> about where the seg fault happens.

> I currently think Windows is evil and would like to jump on its
> grave :) Give me a day or so to gather some energy.
>
Okay. Thanks for you contribution.
Ralf

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFCaSeHGkrI36lV8gURAozfAKCKu9SXHA0wj81Q3Elh9+xQW3N/PwCeNujB
Hoy2RG1cVvToH1wC6uQMm8U=
=MAkC
-----END PGP SIGNATURE-----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-cygwin/attachments/20050422/669f1f7c/attachment-0001.html


More information about the kde-cygwin mailing list