[flac-dev] Anyone tried building FLAC with MSVC?
Martijn van Beurden
mvanb1 at gmail.com
Thu Jan 24 14:10:37 PST 2013
Hi all,
I've been struggling for several weeks to get Microsoft Visual Studio
2005 to build FLAC. MinGW worked fine, but the resulting binary didn't
support Cyrillic or Greek characters, so I thought MSVC might cut it.
Anyway, I'm not a very good programmer, but I got it working. Probably
it's of use to tell what I did
1) Compile ogg and get the library and include tree in the FLAC
directory tree (that's in the README)
2) Install NASM (that's in the README too)
3) Install a platform SDK (I chose the one for XP SP2)
4) Set MSVC target to Release
5) Add alloc.h to the grabbag_static source files
6) Replace all occurrences of static inline with static __inline
7) Tell the linker to ignore msvcrt.lib
8) Replace all occurrences of %" PRIu64 " with %I64u (I'm not sure
whether that is correct)
9) Uninline all (non-static) inlined function in bitreader.c and
bitwriter.c (otherwise the linker complains)
As I said, I'm not a very good programmer so I'm not sure whether any of
the above changes might induce other problems. Anyway, the resulting
flac binary doesn't accept Cyrillic or Greek either (just like the flac
1.2.1 release), so I guess it's not compiler related.
Anyway, I'll stick with MinGW in the future :)
More information about the flac-dev
mailing list