Trolltech Home | Qtopia-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qtopia-interest Archive, May 2007
Re: Another problem of cross-compiling Qtopia Core-4.3.0beta


Message 1 in thread

On Sunday 22 April 2007 14:48, duwchy wrote:
> Hi,
> i have solved first problem today, compiling process continue. but another
> strange error occured when the compiling process continue! when it compiled
> the file 'src/gui/embedded/qlock.cpp', it showed a error in the header file
> 'src/gui/embedded/qwssignalhandler_p.h', following is the message:
>
> armv4l-unknown-linux-g++ -c -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT
> -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -
>
> DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT
> -DQT_RASTER_IMAGEENGINE -DQT_RASTER_PAINTENGINE
>
> -DQT_NO_FONTCONFIG -DFT2_BUILD_LIBRARY -DFT_CONFIG_OPTION_SYSTEM_ZLIB
> -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -
>
> DQT_NO_STYLE_WINDOWSXP -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB
> -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -
>
> I../../mkspecs/qws/linux-arm-g++ -I. -I../../include/QtCore
> -I../../include/QtCore -I../../include -I../../include/QtGui -
>
> I../3rdparty/libpng -I../3rdparty/zlib -I../3rdparty/freetype/src
> -I../3rdparty/freetype/include -
>
> I../3rdparty/freetype/builds/unix -I../3rdparty/harfbuzz/src
> -I../../include/QtNetwork -I.moc/release-shared-emb-arm -
>
> I.uic/release-shared-emb-arm -I../../include/QtCore -I../../include/QtCore
> -I../../include -I../../include/QtGui -
>
> I../3rdparty/libpng -I../3rdparty/zlib -I../3rdparty/freetype/src
> -I../3rdparty/freetype/include -
>
> I../3rdparty/freetype/builds/unix -I../3rdparty/harfbuzz/src
> -I../../include/QtNetwork -I.moc/release-shared-emb-arm -
>
> I.uic/release-shared-emb-arm -o .obj/release-shared-emb-arm/qlock.o
> embedded/qlock.cpp In file included from embedded/qlock.cpp:28:
> embedded/qwssignalhandler_p.h:63: `sighandler_t' was not declared in this
> scope embedded/qwssignalhandler_p.h:63: template argument 2 is invalid
> embedded/qwssignalhandler_p.h:63: ANSI C++ forbids declaration
> `oldHandlers' with no type make[1]: ***
> [.obj/release-shared-emb-arm/qlock.o] Error 1
> make[1]: Leaving directory
> `/root/qt/qtopia-core-opensource-src-4.3.0beta/src/gui' make: ***
> [sub-gui-make_default-ordered] Error 2
>
> i found that  'qlock.cpp' and 'qwssignalhandler_p.h' are compile for the
> multiple-process. if i missed some settings? or it is a bug? i configure
> the project as:
> ./configure -no-cups -xplatform qws/linux-arm-g++ -opengl -no-qvfb -depths
> 8,16,32 -embedded arm and i foud that the  'sighandler_t' has been defined
> in  'qwssignalhandler_p.h' between '#ifdef Q_OS_BSD4' and '#endif', but my
> PC is not the type of BSD4, so it is not defined(i think). but it will be
> used in the following codes. here are the code of 'qwssignalhandler_p.h':
> #include <QtCore/qmap.h>
> #include <QtCore/qvector.h>
> #include <QtCore/qobjectcleanuphandler.h>
> #include <signal.h>
>
> #ifdef Q_OS_BSD4
> typedef sig_t sighandler_t;
> #endif
>
> class QWSSignalHandlerPrivate;
>
> class QWSSignalHandler
> {
> public:
>     static QWSSignalHandler* instance();
>
>     ~QWSSignalHandler();
>
>     inline void addSemaphore(int semno) { semaphores.append(semno); }
>     void removeSemaphore(int semno);
>     inline void addObject(QObject *object) { (void)objects.add(object); }
>
> private:
>     QWSSignalHandler();
>     static void handleSignal(int signal);
>     QMap<int, sighandler_t> oldHandlers;      //'sighandler_t' is used
> here, compiling error here QVector<int> semaphores;
>     QObjectCleanupHandler objects;
>
>     friend class QWSSignalHandlerPrivate;
> };
>
> what's wrong? what can i do?
> thanks a million!

Try adding

typedef void (*sighandler_t)(int);

to the header file.

--
 [ signature omitted ]