Hello,

thank you for your detailed reply!

On 05-Mar-23 16:30, Zdenek Kabelac wrote:
> > -#ifndef HAVE_LRINTF
> > -/* XXX: add ISOC specific test to avoid specific BSD testing. */
> > -/* better than nothing implementation. */
> > -/* btw, rintf() is existing on fbsd too -- alex */
> > -static always_inline long int lrintf(float x)
> > -{
> > -#ifdef CONFIG_WIN32
> > -#  ifdef ARCH_X86
> > -    int32_t i;
> > -    asm volatile(
> > -        "fistpl %0\n\t"
> > -        : "=m" (i) : "t" (x) : "st"
> > -    );
> > -    return i;
> > -#  else
> > -    /* XXX: incorrect, but make it compile */
> > -    return (int)(x + (x < 0 ? -0.5 : 0.5));
> > -#  endif
> > -#else
> > -    return (int)(rint(x));
> > -#endif
> > -}
> > -#else
> > -#ifndef _ISOC9X_SOURCE
> > -#define _ISOC9X_SOURCE
> > -#endif
> >  #include <math.h>
> > -#endif
> 
> What's wrong with this one ???

Nothing is wrong with the code. However, the 'configure' script
somehow fails to define HAVE_LRINTF. This causes the fallback code to be 
compiled, which leads to an error because lrintf actually already exists. 
Is there any reason not to use just "#include <math.h>" 
which should work in any standard C environment?

> > +#define MAX_BUFFER_TIME 1.0;
> > +
> >  class AudioQueue
> >  {
> >  public:
> > -    static const double MAX_BUFFER_TIME = 1.0;
> 
> Wow - gcc-4.0 does not support const doubles - that would be
> something new to me ????
> Are you sure about this ?
> 
> >  
> > -    static const float m_fDropLimit = -0.015;
> > -
> >  static const int PRIORITY_ADD_AUDIO = 0;
> > +static const float m_fDropLimit = -0.015;
> 
> What's wrong with class static variables in gcc-4.0 ??

> Please explain me what's wrong with const doubles so you have replaced
> them with macros (which aren't obviously vissible in debugger)

I am not sure why, but these 'static const' definitions 
inside of a class cause the compilation with gcc-4.0 to 
fail with an 'undefined reference' error message. 
Outside the class, these definitions work fine.

The exact error message is as follows:

x86_64-linux-g++ -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE 
-pipe -o .libs/aviplay actioncfg.o main.o playercontrol.o decoder_config.o 
configdialog.o configdialog_impl.o  ../libavqt/.libs/libqavm.so 
/usr/lib/libqt-mt.so ../lib/.libs/libaviplay.so /usr/lib/libSDL.so -lpthread 
-L/usr/X11R6/lib -lSM -lICE -lXinerama -lXv -lXxf86vm -lXxf86dga -lXi -lXext 
-lX11 -lnsl -ldl
../lib/.libs/libaviplay.so: undefined reference to 
`avm::AudioQueue::MAX_BUFFER_TIME'
collect2: ld returned 1 exit status
make[2]: *** [aviplay] Error 1
make[2]: Leaving directory `/srv/dbuild/tmp/avifile-0.7.43.20050224/player'

Regards
Andreas Jochens


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to