paragui-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [paragui-dev] Compiling paragui on x86_64


From: Ulf Lorenz
Subject: Re: [paragui-dev] Compiling paragui on x86_64
Date: Sat, 14 Aug 2004 13:57:12 +0200
User-agent: Mutt/1.5.6+20040722i

On Mon, Aug 16, 2004 at 12:55:44AM -0400, Camilo Polym?ris wrote:
> I was trying to compile paragui (the stable cvs version) on x86_64 
> architecture and got the following message from make:
> 
> make[2]: Entering directory `/usr/src/packages/SOURCES/paragui/src/core'
> if /bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. 
> -I../../include -I/usr/include/SDL -D_REENTRANT -I./../physfs -I../../include 
>    
> -g -O2 -Wall -I/usr/include/freetype2   -fno-exceptions -MT pgtimerobject.lo 
> -MD -MP -MF ".deps/pgtimerobject.Tpo" -c -o pgtimerobject.lo 
> pgtimerobject.cpp; \
> then mv -f ".deps/pgtimerobject.Tpo" ".deps/pgtimerobject.Plo"; else rm -f 
> ".deps/pgtimerobject.Tpo"; exit 1; fi
>  g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/SDL -D_REENTRANT 
> -I./../physfs -I../../include -g -O2 -Wall -I/usr/include/freetype2 
> -fno-exceptions -MT pgtimerobject.lo -MD -MP -MF .deps/pgtimerobject.Tpo -c 
> pgtimerobject.cpp  -fPIC -DPIC -o .libs/pgtimerobject.o
> pgtimerobject.cpp: In member function `PG_TimerID
>    PG_TimerObject::AddTimer(unsigned int)':
> pgtimerobject.cpp:37: warning: cast to pointer from integer of different size
> pgtimerobject.cpp: In static member function `static Uint32
>    PG_TimerObject::callbackTimer(unsigned int, void*)':
> pgtimerobject.cpp:67: error: reinterpret_cast from `void*' to `PG_TimerID'
>    loses precision
> make[2]: *** [pgtimerobject.lo] Error 1
> make[2]: Leaving directory `/usr/src/packages/SOURCES/paragui/src/core'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/packages/SOURCES/paragui/src'
> make: *** [all-recursive] Error 1
> 
> I think the problem is the cast from a pointer to UInt32 and back --while 
> x86_64 bit machines have 64 bit pointers (?).
> Any idea how to fix this?
A quick fix would be substituting the reinterpret_cast in line 67 by a
static_cast. This will cause problems when the timer id gets too large,
but paragui starts to count from 0, so you have quite a lot of timers
before you get a problem there. :)


cu,
Ulf

-- 
recursive:
            see recursive




reply via email to

[Prev in Thread] Current Thread [Next in Thread]