Hi all, I tried building the latest flac.git on Windows with MinGW just today, and got the following build error: (I had to copy-paste this 'by hand', so there might be a few small mistakes)> CCLD utf8/libutf8.la > CC win_utf8_io/win_utf8_io.lo > win_utf8__io/win_utf8_io.c:266:13: error: static declaration > of 'set_filename_utf8' follows non-static declaration > static void set_filename_utf8(int b) > ^ > win_utf8__io/win_utf8_io.c:106:6: note: previous declaration > of 'set_filename_utf8' was here > void set_filename_utf8(int b); > ^ > > win_utf8__io/win_utf8_io.c:266:13: warning: > 'set_filename_utf8' defined but not used [-Wunused-function] > static void set_filename_utf8(int b) > ^ > > make[3]: *** [win_utf8_io/win_utf8_io.lo] Error 1This probably has something to do with the recently merged utf8 patches? FLAC 1.3.1 didn't have this problem.
Martijn van Beurden wrote:> Hi all, > > I tried building the latest flac.git on Windows with MinGW just > today, and got the following build error: (I had to copy-paste > this 'by hand', so there might be a few small mistakes) > >> CCLD utf8/libutf8.la >> CC win_utf8_io/win_utf8_io.lo >> win_utf8__io/win_utf8_io.c:266:13: error: static declaration >> of 'set_filename_utf8' follows non-static declaration >> static void set_filename_utf8(int b) >> ^ >> win_utf8__io/win_utf8_io.c:106:6: note: previous declaration >> of 'set_filename_utf8' was here >> void set_filename_utf8(int b); >> ^ >> >> win_utf8__io/win_utf8_io.c:266:13: warning: >> 'set_filename_utf8' defined but not used [-Wunused-function] >> static void set_filename_utf8(int b) >> ^ >> >> make[3]: *** [win_utf8_io/win_utf8_io.lo] Error 1 > > This probably has something to do with the recently merged utf8 > patches? FLAC 1.3.1 didn't have this problem.Here's a simple patch that should fix it (attached). BTW, this version of win_utf8_io.c is intermediate because a part of it will be moved to libFLAC, and I'll test the final version more thoroughly... -------------- next part -------------- A non-text attachment was scrubbed... Name: build_fix.patch Type: application/octet-stream Size: 427 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20160202/64145035/attachment.obj
Martijn van Beurden wrote:> Hi all, > > I tried building the latest flac.git on Windows with MinGW just > today, and got the following build error: (I had to copy-paste > this 'by hand', so there might be a few small mistakes)Should be fixed now. Please test. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Reasonably Related Threads
- make dllimport/dllexport attributes work with mingw (and others)
- make dllimport/dllexport attributes work with mingw (and others)
- Building FLAC with LTO
- make dllimport/dllexport attributes work with mingw (and others)
- [PATCH 5/5] win_utf8_io: Avoid forbidden functions when building for WinRT/UWP