Qt4 on Cygwin
Ralf Habacker
ralf.habacker at freenet.de
Wed Jul 25 16:24:18 CEST 2007
Enrico Forestieri schrieb:
> Yaakov writes:
>
>
>> Enrico Forestieri wrote:
>>
>>> I still have not published my patch. It is my intention to update the
>>> wiki page http://wiki.lyx.org/LyX/LyXOnCygwin to Qt4 in the near future.
>>>
>> I'm only looking for a patch which fixes the code wrt the .rdata issue,
>> without using the i386pe.x-no-rdata script workaround. For Qt3 this was
>> simply a matter of patching src/moc/moc.y; with Qt4 moc has changed and
>> this doesn't appear to be so simple.
>>
You can use the import/export decoration which is used by native
Qt/windows. See the following part in src/corelib/global/qglobal.h
#ifndef Q_DECL_EXPORT
# ifdef Q_OS_WIN
# define Q_DECL_EXPORT __declspec(dllexport)
# elif defined(QT_VISIBILITY_AVAILABLE)
# define Q_DECL_EXPORT __attribute__((visibility("default")))
# endif
# ifndef Q_DECL_EXPORT
# define Q_DECL_EXPORT
# endif
#endif
#ifndef Q_DECL_IMPORT
# if defined(Q_OS_WIN)
# define Q_DECL_IMPORT __declspec(dllimport)
# else
# define Q_DECL_IMPORT
# endif
#endif
and
#if defined(Q_OS_WIN)
# if defined(QT_NODLL)
# undef QT_MAKEDLL
# undef QT_DLL
# elif defined(QT_MAKEDLL) /* create a Qt DLL library */
# if defined(QT_DLL)
# undef QT_DLL
# endif
# if defined(QT_BUILD_CORE_LIB)
# define Q_CORE_EXPORT Q_DECL_EXPORT
# else
...
you should disable then auto-import stuff when linking.
Ralf
More information about the kde-cygwin
mailing list