[flac-dev] [PATCH] Compilation failure...

lvqcl lvqcl.mail at gmail.com
Wed Feb 10 08:05:26 PST 2016


John Warburton wrote:

> Thank you for the feedback.
>
> This is cross-compiling for mingw-w64-x86_64 using gcc-5.3.0 and
> mingw-w64-4.0.4 on GNU/Linux.
>
> Upon attempting to compile now, a large number of errors occur in
> flac/decode.c which I have placed at the end of this email. They are eased
> by adding this to decode.c:
>
> #if _WIN32
> #include <windows.h>
> #include <shlobj.h>
> #endif
>
> ...among the headers.
>
> Then, this error results when attempting to link flac.exe:
>
> decode.o:decode.c:(.text+0x4fe1): undefined reference to `CreateFile_utf8'
> decode.o:decode.c:(.text+0x50fb): undefined reference to `CreateFile_utf8'
> ../../src/share/grabbag/.libs/libgrabbag.a(file.o):file.c:(.text+0x156):
> undefined reference to `CreateFile_utf8'
> ../../src/share/grabbag/.libs/libgrabbag.a(file.o):file.c:(.text+0x188):
> undefined reference to `CreateFile_utf8'
> collect2: error: ld returned 1 exit status
> Makefile:487: recipe for target 'flac.exe' failed
>
> I believe the developers have been attending to code relevant to this error
> in the recent past.


It seems that some patch was partially applied. Two possible fixes for
the problem are attached.

The first adds missing defines to src/flac/decode.c and src/share/grabbag/file.c

The second removes #ifdef...#endif directives from windows_unicode_filenames.(c|h)

(they're mutually exclusive - there's no point in applying both of them)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_variant1.patch
Type: application/octet-stream
Size: 745 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20160210/8d0c1114/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_variant2.patch
Type: application/octet-stream
Size: 1263 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20160210/8d0c1114/attachment-0001.obj 


More information about the flac-dev mailing list