@@ -14,6 +14,17 @@ \chapter{Building C and \Cpp{} Extensions on Windows%
1414section. You will still need the C compiler that was used to build
1515Python; typically Microsoft Visual \Cpp .
1616
17+ \begin {notice }
18+ This chapter mentions a number of filenames that include an encoded
19+ Python version number. These filenames are represented with the
20+ version number shown as \samp {XY}; in practive, \character {X} will
21+ be the major version number and \character {Y} will be the minor
22+ version number of the Python release you're working with. For
23+ example, if you are using Python 2.2.1, \samp {XY} will actually be
24+ \samp {22}.
25+ \end {notice }
26+
27+
1728\section {A Cookbook Approach \label {win-cookbook } }
1829
1930There are two approaches to building extension modules on Windows,
@@ -167,11 +178,11 @@ \section{A Cookbook Approach \label{win-cookbook}}
167178
168179 Select `` Win32 Release'' in the `` Settings for'' dropdown list.
169180 Click the Link tab, choose the Input Category, and append
170- \code {python22 .lib} to the list in the `` Object/library modules''
181+ \code {pythonXY .lib} to the list in the `` Object/library modules''
171182 box.
172183
173184 Select `` Win32 Debug'' in the `` Settings for'' dropdown list, and
174- append \code {python22_d .lib} to the list in the `` Object/library
185+ append \code {pythonXY_d .lib} to the list in the `` Object/library
175186 modules'' box. Then click the C/\Cpp {} tab, select `` Code
176187 Generation'' from the Category dropdown list, and select `` Debug
177188 Multithreaded DLL'' from the `` Use run-time library'' dropdown
@@ -275,19 +286,19 @@ \section{Using DLLs in Practice \label{win-dlls}}
275286compilers may or may not work (though Borland seems to). The rest of
276287this section is MSV\Cpp {} specific.
277288
278- When creating DLLs in Windows, you must pass \file {python15 .lib} to
289+ When creating DLLs in Windows, you must pass \file {pythonXY .lib} to
279290the linker. To build two DLLs, spam and ni (which uses C functions
280291found in spam), you could use these commands:
281292
282293\begin {verbatim }
283- cl /LD /I/python/include spam.c ../libs/python15 .lib
284- cl /LD /I/python/include ni.c spam.lib ../libs/python15 .lib
294+ cl /LD /I/python/include spam.c ../libs/pythonXY .lib
295+ cl /LD /I/python/include ni.c spam.lib ../libs/pythonXY .lib
285296\end {verbatim }
286297
287298The first command created three files: \file {spam.obj},
288299\file {spam.dll} and \file {spam.lib}. \file {Spam.dll} does not contain
289300any Python functions (such as \cfunction {PyArg_ParseTuple()}), but it
290- does know how to find the Python code thanks to \file {python15 .lib}.
301+ does know how to find the Python code thanks to \file {pythonXY .lib}.
291302
292303The second command created \file {ni.dll} (and \file {.obj} and
293304\file {.lib}), which knows how to find the necessary functions from
0 commit comments