[Qt-interest] compile error when change from ubuntu/debian to centos
Colin S. Miller
no-spam-thank-you at csmiller.demon.co.uk
Wed Jun 9 20:03:07 CEST 2010
Iwan Budi Kusnanto wrote:
> Hi,
> my qt app was fine when built in ubuntu/debian.
> In my centos machine, compilation failed.
> Below is the error message, any idea?
>
> [iwan at paijo travel]$ /usr/lib/qt4/bin/qmake
> [iwan at paijo travel]$ make
> g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_SQL_LIB
> -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
> -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore
> -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtGui
> -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtSql
> -I/usr/lib/qt4/include/QtSql -I/usr/lib/qt4/include -I. -I. -o main.o
> main.cpp
> /usr/lib/qt4/include/QtCore/qatomic_i386.h: In function ‘int
> q_atomic_test_and_set_ptr(volatile void*, void*, void*)’:
> /usr/lib/qt4/include/QtCore/qatomic_i386.h:58: error: cast from
> ‘void*’ to ‘int’ loses precision
> /usr/lib/qt4/include/QtCore/qatomic_i386.h:59: error: cast from
> ‘void*’ to ‘int’ loses precision
> /usr/lib/qt4/include/QtCore/qatomic_i386.h: In function ‘void*
> q_atomic_set_ptr(volatile void*, void*)’:
> /usr/lib/qt4/include/QtCore/qatomic_i386.h:98: error: cast from
> ‘void*’ to ‘int’ loses precision
> make: *** [main.o] Error 1
>
>
Iwan,
it looks like void* is now wider that int.
As a guess, the new machine is using 64-bit pointers.
What versions of GCC where you using, and were the
machines running the 32 bit or 64 bit kernel?
HTH,
Colin S. Miller
More information about the Qt-interest-old
mailing list