Janne Hyv?rinen wrote:> With the sources as they are compiling produces these errors (this on > MSVC 2012 SP1 Express): > > Error 1 error LNK2001: unresolved external symbol > _FLAC__bitreader_bits_left_for_byte_alignment > G:\Programming\flac-1.3.0pre2\src\flac\libFLAC_static.lib(stream_decoder.obj)Ben Alison is working on tthis. Lets allow that work to come to a conclusion.> Error 9 error LNK2001: unresolved external symbol > _safe_malloc_mul_2op_ > G:\Programming\flac-1.3.0pre2\src\flac\utf8_static.lib(utf8.obj) flac > Error 10 error LNK1120: 9 unresolved externals > G:\Programming\flac-1.3.0pre2\objs\release\bin\flac.exe flac > > Error 9 is related to the location of _safe_malloc_mul_2op_. It's > easiest to fix by having the code in utf8.c.But that function is defined in src/share/grabbag/alloc.c and should be getting linked into flac.exe. It doesn't need to be redefined in utf8.c. Specifically, I think alloc.c should be added as one of the build files in src/share/grabbag/grabbag_static.vcproj src/share/grabbag/grabbag_dynamic.vcproj Please try this and if that fixes it, please send a patch containing only that change. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
On 11.3.2013 21:21, Erik de Castro Lopo wrote:>> Error 9 error LNK2001: unresolved external symbol >> _safe_malloc_mul_2op_ >> G:\Programming\flac-1.3.0pre2\src\flac\utf8_static.lib(utf8.obj) flac >> Error 10 error LNK1120: 9 unresolved externals >> G:\Programming\flac-1.3.0pre2\objs\release\bin\flac.exe flac >> >> Error 9 is related to the location of _safe_malloc_mul_2op_. It's >> easiest to fix by having the code in utf8.c. > But that function is defined in src/share/grabbag/alloc.c and should > be getting linked into flac.exe. It doesn't need to be redefined in > utf8.c. Specifically, I think alloc.c should be added as one of the > build files in > > src/share/grabbag/grabbag_static.vcproj > src/share/grabbag/grabbag_dynamic.vcproj > > Please try this and if that fixes it, please send a patch containing > only that change.I thought Ben Allison would have made a patch. Here's a patch for this. I suppose we were all blind at first for the cause. -------------- next part -------------- diff -rupN a/src/share/grabbag/grabbag_static.vcproj b/src/share/grabbag/grabbag_static.vcproj --- a/src/share/grabbag/grabbag_static.vcproj Wed Jan 2 13:49:55 2013 +++ b/src/share/grabbag/grabbag_static.vcproj Tue Mar 12 09:46:01 2013 @@ -163,6 +163,10 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > <File + RelativePath=".\alloc.c" + > + </File> + <File RelativePath=".\cuesheet.c" > </File>
Janne Hyv?rinen wrote:> I thought Ben Allison would have made a patch. Here's a patch for this. > I suppose we were all blind at first for the cause.Applied thanks. I'd now like to look at the 2/4Gig off_t issue in your original support_2gb_output patch. Unlike your original patch, you will have to avoid touchng anything in the directories: include/FLAC include/FLAC++ as these are the public API headers and we don't want to change the API in this release. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/