summaryrefslogtreecommitdiffstats
path: root/Doc/ext
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-04-19 04:04:57 (GMT)
committerFred Drake <fdrake@acm.org>2002-04-19 04:04:57 (GMT)
commitc55ae4b98ce819333a48c743a1a2f778a2741a85 (patch)
treed0c5180f8623c7fffc8eeccbcd69193ea72af564 /Doc/ext
parent3b959dbcaffe7fce27b21cde42b7d77a8ac29191 (diff)
downloadcpython-c55ae4b98ce819333a48c743a1a2f778a2741a85.zip
cpython-c55ae4b98ce819333a48c743a1a2f778a2741a85.tar.gz
cpython-c55ae4b98ce819333a48c743a1a2f778a2741a85.tar.bz2
Clean up the use of version numbers in filenames; always use an "abstract"
version number, and explain what it is at the top of the chapter. This closes SF bug #225003.
Diffstat (limited to 'Doc/ext')
-rw-r--r--Doc/ext/windows.tex23
1 files changed, 17 insertions, 6 deletions
diff --git a/Doc/ext/windows.tex b/Doc/ext/windows.tex
index bff7f05..f3279d6 100644
--- a/Doc/ext/windows.tex
+++ b/Doc/ext/windows.tex
@@ -14,6 +14,17 @@ building extension modules, instead of the one described in this
section. You will still need the C compiler that was used to build
Python; typically Microsoft Visual \Cpp.
+\begin{notice}
+ This chapter mentions a number of filenames that include an encoded
+ Python version number. These filenames are represented with the
+ version number shown as \samp{XY}; in practive, \character{X} will
+ be the major version number and \character{Y} will be the minor
+ version number of the Python release you're working with. For
+ example, if you are using Python 2.2.1, \samp{XY} will actually be
+ \samp{22}.
+\end{notice}
+
+
\section{A Cookbook Approach \label{win-cookbook}}
There are two approaches to building extension modules on Windows,
@@ -167,11 +178,11 @@ Hello, world
Select ``Win32 Release'' in the ``Settings for'' dropdown list.
Click the Link tab, choose the Input Category, and append
- \code{python22.lib} to the list in the ``Object/library modules''
+ \code{pythonXY.lib} to the list in the ``Object/library modules''
box.
Select ``Win32 Debug'' in the ``Settings for'' dropdown list, and
- append \code{python22_d.lib} to the list in the ``Object/library
+ append \code{pythonXY_d.lib} to the list in the ``Object/library
modules'' box. Then click the C/\Cpp{} tab, select ``Code
Generation'' from the Category dropdown list, and select ``Debug
Multithreaded DLL'' from the ``Use run-time library'' dropdown
@@ -275,19 +286,19 @@ Windows Python is built in Microsoft Visual \Cpp; using other
compilers may or may not work (though Borland seems to). The rest of
this section is MSV\Cpp{} specific.
-When creating DLLs in Windows, you must pass \file{python15.lib} to
+When creating DLLs in Windows, you must pass \file{pythonXY.lib} to
the linker. To build two DLLs, spam and ni (which uses C functions
found in spam), you could use these commands:
\begin{verbatim}
-cl /LD /I/python/include spam.c ../libs/python15.lib
-cl /LD /I/python/include ni.c spam.lib ../libs/python15.lib
+cl /LD /I/python/include spam.c ../libs/pythonXY.lib
+cl /LD /I/python/include ni.c spam.lib ../libs/pythonXY.lib
\end{verbatim}
The first command created three files: \file{spam.obj},
\file{spam.dll} and \file{spam.lib}. \file{Spam.dll} does not contain
any Python functions (such as \cfunction{PyArg_ParseTuple()}), but it
-does know how to find the Python code thanks to \file{python15.lib}.
+does know how to find the Python code thanks to \file{pythonXY.lib}.
The second command created \file{ni.dll} (and \file{.obj} and
\file{.lib}), which knows how to find the necessary functions from