File: win32.html

package info (click to toggle)
audacity 1.2.4b-2.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 24,136 kB
  • ctags: 20,445
  • sloc: ansic: 139,567; cpp: 55,998; sh: 24,963; lisp: 3,772; makefile: 1,683; python: 272
file content (177 lines) | stat: -rw-r--r-- 5,945 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>

<HEAD>
	<TITLE>
	Building libsndfile on Win32
	</TITLE>
	<META NAME="Author"      CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
	<LINK REL=StyleSheet HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
</HEAD>

<BODY>
<!-- pepper -->
<H1><BR>Building libsndfile on Win32</H1>

<P>
There are currently two ways of building libsndfile under Win32:
</P>
<UL>
	<LI> Using the free <A HREF="#MinGW">MinGW</A> tools.
	<LI> Using Microsoft's <A HREF="#MSVC">Visual C++</A> tools.
</UL>

<P>
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.
</P>

<A NAME="MinGW"></A>
<H2><BR>Building libsndfile using MinGW.</H2>
<P>
The MinGW tools are available from <A HREF="http://www.mingw.org/">
http://www.mingw.org/</A>.
The files you will need will be named something like:
</P>
<UL>
	<LI> msysDTK-1.0.1.exe
	<LI> MSYS-1.0.10.exe
	<LI> gcc-core-3.3.1-20030804-1.tar.gz
	<LI> gcc-g++-3.3.1-20030804-1.tar.gz
	<LI> binutils-2.13.90-20030111-1.tar.gz
	<LI> mingw-runtime-3.2.tar.gz
	<LI> w32api-2.5.tar.gz
	<LI> mingw-utils-0.3.tar.gz
</UL>

<P>
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.
</P>

<P>
Once you have the tools installed you will get an icon named <B>MSYS</B> on
your desktop.
Clicking on that icon will bring up something that looks a little like an
xterm.
</P>

<P>
Assuming that you have downloaded the <B>.tar.gz</B> file into the
<B>C:\temp\</B> directory you should now be able to execute the following
commands:
</P>

<PRE>
		tar zxf /c/temp/libsndfile.X.Y.Z.tar.gz
		cd libsndfile-X.Y.Z
		./configure
		make
		make check
</PRE>

<P>
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.
</P>

<P>
Once this is done, anyone interested in using libsndfile in other projects
will be interested in the following files:
</P>
<UL>
	<LI> libsndfile.dll
	<LI> libsndfile.lib
	<LI> libsndfile.def
	<LI> src/sndfile.h
	<LI> doc/*.html
</UL>

<!--===========================================================================-->

<A NAME="MSVC"></A>
<H2><BR>Building libsndfile using MSVC++ 6.</H2>
<P>
For Win32 there is a Microsoft Visual C++ compatible makefile in the <B>Win32\</B>
directory of the distribution. Building the libsndfile DLL on Win32 involves
the following:
</P>
<!-- pepper -->
<OL>
	<LI> 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
		<B>C:\</B>.
	<LI> In the directory containing the extracted files, find the file
	    	<B>Win32\Makefile.msvc</B> and open it in a text editor (ie Notepad or
			similar).
	<LI> Find the line which starts with <B>MSVCDir</B> 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. Note that none of the directory names are allowed to have spaces
			in them.
	<LI> Copy the file named <B>sndfile.h</B> from the <B>Win32\</B> directory to the
			<B>src\</B> directory replacing the one that was originally there.
	<LI> Copy the file named <B>config.h</B> from the <B>Win32\</B> directory to the
			<B>src\</B> directory replacing the one that was originally there.
	<LI> Open a DOS window and cd into the libsndfile-1.X.Y directory.
	<LI> Make sure that the program <B>nmake</B> (which is part of the MSCV++
			package) is in a directory which is part of your <B>PATH</B> variable.
	<LI> Type in the command
			<CENTER><PRE>C:\libsndfile-1.X.Y> nmake -f Win32\Makefile.msvc
			</PRE></CENTER>
			and press &lt;return&gt;. You should now see a a large number of compile
			commands as libsndfile.dll is built.
			If this command fails, that may mean that <B>nmake</B> is not in a
			directory specified by your <B>PATH</B> environment variable.
	<LI> To check that the built DLL has been compiled correctly type in and run the
			command
			<CENTER><PRE>C:\libsndfile-1.X.Y> nmake -f Win32\Makefile.msvc check
			</PRE></CENTER>
			which will compile a set of test programs and run them. If any of the
			programs fail the error message will be helpful in debugging the problem.
</OL>
<!-- pepper -->
<P>
At the end of the above procedure, you will find the DLL, <B>libsndfile.dll</B> and a
LIB file <B>libsndfile.lib</B> in the current directory. These two files, along
with the header file <B>sndfile.h</B> (in the <B>Win32\</B> directory) are all that
you need to copy to your project in order to use libsndfile.
</P>
<!-- pepper -->
<H2><BR>Compile Problems</H2>
<!-- pepper -->
<P>
Compile problems using the above method of building the libsndfile DLL on Win32 should
be emailed to
	<A HREF="m&#97;ilt&#111;:&#101;rikd&#64;&#109;eg&#97;-&#110;erd.&#99;om">
		Erik de Castro Lopo</a>.
This includes error messages generated during step 7 above.
</P>
<!-- pepper -->
<P>
If you are using some other method to compile the libsndfile DLL you are on your own.
</P>
<BR>
<!-- pepper -->
<!-- pepper -->
<!-- pepper -->
<!-- pepper -->

</BODY>
</HTML>

<!--
  Do not edit or modify anything in this comment block.
  The arch-tag line is a file identity tag for the GNU Arch
  revision control system.

  arch-tag: b32ddb11-eb51-425f-9d39-b8b66284f129
-->