How to set the QT_DLL macro?

Ralf Habacker ralf.habacker at freenet.de
Thu Apr 21 21:35:00 CEST 2005


Angus Leeming schrieb:

>This is partly a report that I've successfully built LyX 1.3.x for Windows
>using the mingw cross-compiler on linux, but it's also a request for help. 
>
>In order for the linking to succeed, I have to define the QT_DLL macro when
>building LyX's Qt code.. If I don't then linking fails with vast numbers
>of warnings like:
>
>frontends/.libs/libfrontends.a(QBibitemDialogBase.o)(.text+0x583): In
>function `_ZNK6QGList5countEv':
>/home/angus/lyx/13x/build-mingw-xcompile/src/frontends/qt2/ui/QBibitemDialogBase.C:
>variable 'vtable for QSpacerItem' can't be auto-imported. Please read the
>documentation for ld's --enable-auto-import for details.
>  
>
This problem is fixed by adding the following line to
mkspecs\win32-g++\qmake.conf
QMAKE_LFLAGS            = -Wl,--enable-runtime-pseudo-reloc

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

>I'm currently passing -DQT_DLL to the compiler explicitly. However, I don't
>need to do that when compiling using the mingw compiler natively on
>Windows, so suspect that there's another way. What is the 'correct' way to
>specify the QT_DLL macro?
>
>Any clues?
>
>  
>
add a -shared option to configure or add the term 'shared' to
.qmake.cache's CONFIG line  (qmake/generators/win32/mingw-make.cpp line 406)

>Regards,
>Angus
>
>ps, linking against the qt3.dll is still excrutiatingly slow. Compilation
>is far quicker, but the final link still takes ~20 minutes :(
>
>  
>
This depends on the time of used machine. On a suse linux server system
with Xeon 2.6GHz and sata harddisc linking requires about 30-40 seconds.

>pps, I may have compiled lyx, but trying to start it up on Windows results
>in an error dialog "The application failed to initialise itself
>correctly" :(
>
>  
>
I've heard of similar seg faults with mingw. Do you have tried to link
it static ?

Regards
Ralf

>_______________________________________________
>kde-cygwin mailing list
>kde-cygwin at kde.org
>https://mail.kde.org/mailman/listinfo/kde-cygwin
>  
>


More information about the kde-cygwin mailing list