[Qt] Qt Embedded
Den Jean
Den.Jean at telenet.be
Wed Oct 1 22:56:18 CEST 2008
> In qt4.pas BINUX gets defined...
>
> {$IF DEFINED(LINUX) or DEFINED(FREEBSD) or DEFINED(NETBSD)}
> {$DEFINE BINUX}
> QtIntf = 'libqt4intf.so';
> {$ENDIF}
>
> So is LINUX defined automatically (predefined somewhere?) if using
> arm-linux and if so is BINUX defined as well as QTOPIA if I compile with
> -dQTOPIA (for lcl)
>
What fpc defines:
http://www.freepascal.org/docs-html/prog/progap7.html#x323-323000G
what qt4.pas uses to conditionally allow certain methods:
"BINUX" = defines based upon fpc defines
"MSWINDOWS" = same as fpc define
"DARWIN" = same as fpc define
"QTOPIA" = you need to define it, fpc cannot sense, it is not
the same as arm, because then you could not try qtopia on qvfb on i386.
sample:
{$ifdef BINUX or DARWIN or QTOPIA }
procedure QCoreApplication_watchUnixSignal(signal: Integer; watch: Boolean);
cdecl; external QtIntf name 'QCoreApp
lication_watchUnixSignal';
{$endif}
Note that the c++/c code of the binding
needs these aswell.
#if defined BINUX || DARWIN || QTOPIA
void QCoreApplication_watchUnixSignal(int signal, bool watch)
{
QCoreApplication::watchUnixSignal(signal, watch);
}
#endif
compile qtopia script therefore contains -D QTOPIA:
g++ -D QTOPIA -D
Q_WS_QWS -I. -I$QT4I -I$QT4I/Qt -I$QT4I/QtGui -I$QT4I/QtCore -Iqlcl
qtpas.cpp -o libqt4intf.so -shared -fPIC libQtCore.so.4
libQtGui.so.4 -Xlinker "-soname=libqt4intf.so"
regards,
Den Jean
More information about the Qt
mailing list