Building libsndfile on Win32
For Win32 there is a Microsoft Visual C++ compatible makefile in the Win32\
directory of the distribution. Making the libsndfile DLL on Win32 involves
the following:
- Using WinZip in the GUI, open the libsndfile-1.X.Y.tar.gz file and
extract the files into a directory. The following example assumes
C:\.
- In the directory containing the extracted files, find the file
Win32\Makefile.msvc and open it in a text editor (ie Notepad or
similar).
- Find the line which starts with MSVCDir and modify the directory
path to point to the location of MSVC++ on your machine. This allows the
makefile to inform the compiler of the location of the standard header
files.
- Copy the file named sndfile.h from the Win32\ directory to the
src\ directory replacing the one that was originally there.
- Copy the file named config.h from the Win32\ directory to the
src\ directory replacing the one that was originally there.
- Open a DOS window and cd into the libsndfile-1.X.Y directory.
- Make sure that the program nmake (which is part of the MSCV++
package) is in a directory which is part of your PATH variable.
- Type in the command
C:\libsndfile-1.X.Y> nmake -f Win32\Makefile.msvc
and press <return>. You should now see a a large number of compile
commands as libsndfile.dll is built.
- To check that the built DLL has been compiled correctly type in and run the
command
C:\libsndfile-1.X.Y> nmake -f Win32\Makefile.msvc check
which will compile a set of test programs and run them. If any of the
programs fail the error message will be help in debugging the problem.
At the end of the above procedure, you will find the DLL, libsndfile.dll, 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
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.