#include <stdio.h> #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" #include <io.h> #include <fcntl.h> #pragma comment(lib, "vorbisfile_d") int main(int argc, char **argv) { FILE *fp; OggVorbis_File obf; if(argc < 1) return -1; if((fp = fopen("f:\\testogg.ogg", "rb")) == NULL) { printf("Open Files Error !\n"); return -1; } if(ov_open(fp, &obf, NULL, 0) < 0) { printf("OggVorbis File Open Error ~\n"); return -1; } } run time error when ov_open call :(, help me ! -run in win32 os
On Monday 06 December 2004 16:01, null wrote:> run time error when ov_open call :(, help me ! > -run in win32 osIt's hard to say what this might be. Perhaps you've linked against incompatible versions of the libraries, or something like that? That's the most common cause of unexpected crashes in ov_open() - differing ABIs between application and library. You can usually fix this by either: a) compiling your application using the same settings as the libraries b) recompiling the vorbis libraries using the same settings as your application c) annotating/configuring things to tell your development environment what ABI is in use. Since I'm not a windows expert, nor do I know what development environment you're using, I can't give any more specific advice, sorry. Mike