There are currently two ways of building libsndfile under Win32:
The free MinGW tools are the preferred option because they are a free (as in beer and speech), easily obtainable and much closer to the Linux/GCC environment on which libsndfile is developed. At some time in the near future I intend to drop support for Microsoft's tools. Yes, I know there is now a free (as in beer, but not as in speech) version of Microsoft's tools, but I believe that the only reason Microsoft released these free tools was because of the growing popularity of the MinGW tools.
The MinGW tools are available from http://www.mingw.org/. The files you will need will be named something like:
They should be installed using the directions on the MinGW site. I know the instructions aren't great, but I don't have the time or expertise to write better ones.
Once you have the tools installed you will get an icon named MSYS on your desktop. Clicking on that icon will bring up something that looks a little like an xterm.
Assuming that you have downloaded the .tar.gz file into the C:\temp\ directory you should now be able to execute the following commands:
tar zxf /c/temp/libsndfile.X.Y.Z.tar.gz cd libsndfile-X.Y.Z ./configure make make check
If there is a failure during compiling or the "make check" stage, you should check that you are using the current stable version of the MinGW tools, and the latest version of libsndfile before sending the author a bug report.
Once this is done, anyone interested in using libsndfile in other projects will be interested in the following files:
For Win32 there is a Microsoft Visual C++ compatible makefile in the Win32\ directory of the distribution. Building the libsndfile DLL on Win32 involves the following:
C:\libsndfile-1.X.Y> nmake -f Win32\Makefile.msvc
C:\libsndfile-1.X.Y> nmake -f Win32\Makefile.msvc check
At the end of the above procedure, you will find the DLL, libsndfile.dll and a LIB file libsndfile.lib in the current directory. These two files, along with the header file sndfile.h (in the Win32\ directory) are all that you need to copy to your project in order to use libsndfile.
Compile problems using the above method of building the libsndfile DLL on Win32 should be emailed to Erik de Castro Lopo. This includes error messages generated during step 7 above.
If you are using some other method to compile the libsndfile DLL you are on your own.