[vorbis-dev] GCC 2.95.2(Win32/Mingw32) build

Andy Key scsiprog at hotmail.com
Thu Apr 13 08:42:47 PDT 2000



> >In any case, has anyone managed to build a working copy with either Mingw 
>or
> >Cygwin for 32-bit windows?
>
>Well, crashes are bad, and it would be great to track these down - but you
>don't need gcc to compile it under win32. It's very clean, close to ANSI C.

Actually, the need to use Mingw is mine -- I've written and maintain a few 
rippers for Win32, plus a DLL, and my goal is that everything I put out has 
to compile with freely available tools.  It should also compile with 
commercial tools.

>
>It is known to compile and work perfectly with MSVC (version 5 definately,
>I suspect others have used version 6). I doubt other windows compilers are
>going to be much different - 'porting' the code basically consisted of
>adding a few missing headers, defining int64_t and similar types, and
>defining a few things to work around weirdnesses in MSVC (like _alloca()
>instead of alloca())

I didn't have to add any new headers, but I did have to add in the int64_t 
and int16_t typedefs, and change srandom() to srand(), random() to rand().

>Most notably, the encoder and decoder examples use stdin and stdout. You
>need to switch these to binary mode before doing anything.

Actually, I replaced references to stdin/stdout to hard-coded file names to 
make running under gdb a little easier.

>However, none of that should be causing segfaults - it'd be great if you
>could jump into the code and try and track down where that's happening. The
>idea is that libvorbis should be portable to pretty much any ANSI C
>compiler that is available.

I know the line of code where it's happening... come to think of it, it's 
doing a memcpy() into a buffer that's just been returned from alloca(), in 
the function _ve_deltas() in envelope.c.  I'll try replacing that with a 
normal malloc/free and see if that doesn't help things out.

-Andy
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list