I am writing a FLAC encoder/decoder and when I use the flac_static.lib that was compiled in debug mode in MS Visual Studio 2003, the seek_absolute function works fine. However, if I compile flac_static in release mode in the same environment, the seek_absolute function no longer works. No parts of my code change, the only difference is whether I link in the release lib instead of the debug lib. I just recompiled the whole of a new copy of the FLAC source code so I know I have the most recent FLAC source. I am compiling using MS Visual studio 2003 and writing in C++ but mainly using the C library and not the C++ library of FLAC. I'd be helpful of any hints as to which direction to move in to solve this. Jay Barra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20080211/279af34f/attachment.htm
--- "Barra, Jay F Ctr AFRL/RIEC" <Jay.Barra.ctr@RL.af.mil> wrote:> I am writing a FLAC encoder/decoder and when I use the > flac_static.lib > that was compiled in debug mode in MS Visual Studio 2003, the > seek_absolute function works fine. However, if I compile flac_static > in > release mode in the same environment, the seek_absolute function no > longer works. No parts of my code change, the only difference is > whether I link in the release lib instead of the debug lib. I just > recompiled the whole of a new copy of the FLAC source code so I know > I > have the most recent FLAC source. I am compiling using MS Visual > studio > 2003 and writing in C++ but mainly using the C library and not the > C++ > library of FLAC. I'd be helpful of any hints as to which direction > to move in to solve this.I've had a report from someone else about this but I don't have any idea why. you could try the precompiled ones I make with vc6. those static release libs are linked in to the command-line tools I distribute and have not had any such problems. http://downloads.sourceforge.net/flac/flac-1.2.1-devel-win.zip Josh ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Visual Studio code has different Application Binary Interface conventions for different compilation and linking settings. Not having them all match each other can cause all sorts of really weird bugs. To fix it, make sure that all the libraries and sources going into the executable have the same settings. On Mon, Feb 11, 2008 at 7:23 AM, Barra, Jay F Ctr AFRL/RIEC <Jay.Barra.ctr@rl.af.mil> wrote:> > > > I am writing a FLAC encoder/decoder and when I use the flac_static.lib that > was compiled in debug mode in MS Visual Studio 2003, the seek_absolute > function works fine. However, if I compile flac_static in release mode in > the same environment, the seek_absolute function no longer works.Mike -- Michael David Crawford mdcrawford at gmail dot com Enjoy my art, photography, music and writing at http://www.geometricvisions.com/ --- Free Music Downloads ---