[vorbis-dev] LccWin32 and OGG

alphasnd at free.fr alphasnd at free.fr
Mon Feb 17 09:08:50 PST 2003



  Hello,

  I'm new to OGG and I must say than it's impressive. I plan to use it
in my project (BASIC programming langage) but I use LccWin32 as main
C compiler (free and very powerful) and OGG has some difficulties to
compile. I would like to know if it was already reported. If not,
here it is:

  - Inline ASM functions for vorbis_itoa() isn't ok for LCC (not the
same syntax than VC). I switched back to 'slow' functions for my tests.

  - I got tons of casts error, as Lcc seems to be more stricts about them
than other compiler:
   ex:  float *lpc=alloca(order*sizeof(*lpc));
        will produce a cast error (not a warning) and I have to change to:
        float *lpc=(float *)alloca(order*sizeof(*lpc));

  The same goes for int* etc.. I've looked in the lcc definition file to see
how is declared alloca() and it's like this:

void * _alloca(size_t);
#define alloca _alloca

   - The type definition wasn't correct for LCC, so I used the following
instead, which should be correct:

   typedef long long ogg_int64_t;
   typedef int ogg_int32_t;
   typedef unsigned int ogg_uint32_t;
   typedef short ogg_int16_t;
    
   Ok, once all that converted, it finally compiles (which some warning, but
nothing special). I tested the OggDec.c and it loaded the .ogg and started
the convertion, and then it crashs, during the convertion. I tracked the
bug with the integrated debugger and it seems like and array overflow
in res0.c. Ok, I hope I wasn't too boring to read, just wanted to
make OGG as compatible as possible with C compilers. If you doesn't
know Lcc, it's actually a very respected free C compiler on Windows and
I succeded to compile lot of major opensource software without any problem
like libpng, libjpeg, libtiff, openssl...

      Regards,
  
                    Fred - AlphaSND.
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list