Re: How to set the QT_DLL macro?

Ralf Habacker <[email protected]>
Newsgroups gmane.comp.kde.devel.cygwin
Message-ID <[email protected]>
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

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 ?) 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. 

Regards
 Ralf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.