Building FLAC On Windows Isn’t Easy
Friday, December 4th, 2009FLAC, the Free Lossless Audio Codec, is more popular on *NIX-based operating systems than it is on Windows. This shows in their source code package.
I had to solve two problems in order to build FLAC on windows.
1: The projects try to link to a library called “ogg_static.lib”. The library builds as “libogg_static.lib”, so I had to change the project to add the “lib” prefix.
2: The project tries to compile the main libraries with a file called “nasmw.exe”. I did not have this file and had to do some research to figure out what the heck it was. Turns out it was the Netwide Assembler, which can be found HERE. I downloaded version 2.07 and after installing did not see a nasmw.exe. It seems that the executable is now called nasm.exe, so I dropped a copy renamed to “nasmw.exe” into C:\Windows\System32 and was able to build the main libraries. It did the trick.
Just some things to watch out for if you’re planning on using the FLAC libraries with Windows.