Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 658b50f

Browse files
committed
Update to VC 7.1. Will backport to 2.4.
1 parent ee1d247 commit 658b50f

1 file changed

Lines changed: 54 additions & 54 deletions

File tree

Doc/ext/windows.tex

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ \section{A Cookbook Approach \label{win-cookbook}}
3939
To build extensions using these instructions, you need to have a copy
4040
of the Python sources of the same version as your installed Python.
4141
You will need Microsoft Visual \Cpp{} ``Developer Studio''; project
42-
files are supplied for V\Cpp{} version 6, but you can use older
43-
versions of V\Cpp. The example files described here are distributed
44-
with the Python sources in the \file{PC\textbackslash
45-
example_nt\textbackslash} directory.
42+
files are supplied for V\Cpp{} version 7.1, but you can use older
43+
versions of V\Cpp. Notice that you should use the same version of
44+
V\Cpp that was used to build Python itself. The example files
45+
described here are distributed with the Python sources in the
46+
\file{PC\textbackslash example_nt\textbackslash} directory.
4647

4748
\begin{enumerate}
4849
\item
@@ -57,9 +58,9 @@ \section{A Cookbook Approach \label{win-cookbook}}
5758

5859
\item
5960
\strong{Open the project}\\
60-
From V\Cpp, use the \menuselection{File \sub Open Workspace}
61+
From V\Cpp, use the \menuselection{File \sub Open Solution}
6162
dialog (not \menuselection{File \sub Open}!). Navigate to and
62-
select the file \file{example.dsw}, in the \emph{copy} of the
63+
select the file \file{example.sln}, in the \emph{copy} of the
6364
\file{example_nt} directory you made above. Click Open.
6465

6566
\item
@@ -69,18 +70,17 @@ \section{A Cookbook Approach \label{win-cookbook}}
6970
\begin{enumerate}
7071
\item
7172
Select a configuration. This step is optional. Choose
72-
\menuselection{Build \sub Select Active Configuration} and
73-
select either \guilabel{example - Win32 Release} or
74-
\guilabel{example - Win32 Debug}. If you skip this step,
73+
\menuselection{Build \sub Configuration Manager \sub Active
74+
Solution Configuration} and select either \guilabel{Release}
75+
or\guilabel{Debug}. If you skip this step,
7576
V\Cpp{} will use the Debug configuration by default.
7677

7778
\item
7879
Build the DLL. Choose \menuselection{Build \sub Build
79-
example_d.dll} in Debug mode, or \menuselection{Build \sub
80-
Build example.dll} in Release mode. This creates all
81-
intermediate and result files in a subdirectory called either
82-
\file{Debug} or \file{Release}, depending on which
83-
configuration you selected in the preceding step.
80+
Solution}. This creates all intermediate and result files in
81+
a subdirectory called either \file{Debug} or \file{Release},
82+
depending on which configuration you selected in the preceding
83+
step.
8484
\end{enumerate}
8585

8686
\item
@@ -129,7 +129,7 @@ \section{A Cookbook Approach \label{win-cookbook}}
129129
Now your options are:
130130

131131
\begin{enumerate}
132-
\item Copy \file{example.dsw} and \file{example.dsp}, rename
132+
\item Copy \file{example.sln} and \file{example.vcproj}, rename
133133
them to \file{spam.*}, and edit them by hand, or
134134
\item Create a brand new project; instructions are below.
135135
\end{enumerate}
@@ -142,62 +142,62 @@ \section{A Cookbook Approach \label{win-cookbook}}
142142
little file with only two lines. An alternative approach is to
143143
forget about the \file{.def} file, and add the option
144144
\programopt{/export:initspam} somewhere to the Link settings, by
145-
manually editing the setting in Project Options dialog).
145+
manually editing the setting in Project Properties dialog).
146146

147147
\item
148148
\strong{Creating a brand new project}\\
149-
Use the \menuselection{File \sub New \sub Projects} dialog to
150-
create a new Project Workspace. Select \guilabel{Win32 Dynamic-Link
151-
Library}, enter the name (\samp{spam}), and make sure the
152-
Location is set to the \file{spam} directory you have created
153-
(which should be a direct subdirectory of the Python build tree, a
154-
sibling of \file{Include} and \file{PC}). Select Win32 as the
155-
platform (in my version, this is the only choice). Make sure the
156-
Create new workspace radio button is selected. Click OK.
157-
158-
Now open the \menuselection{Project \sub Settings} dialog. You
159-
only need to change a few settings. Make sure All Configurations
160-
is selected from the Settings for: dropdown list. Select the
161-
C/\Cpp{} tab. Choose the Preprocessor category in the popup menu
162-
at the top. Type the following text in the entry box labeled
163-
\guilabel{Additional include directories}:
149+
Use the \menuselection{File \sub New \sub Project} dialog to
150+
create a new Project Workspace. Select \guilabel{Visual C++
151+
Projects/Win32/ Win32 Project}, enter the name (\samp{spam}), and
152+
make sure the Location is set to parent of the \file{spam}
153+
directory you have created (which should be a direct subdirectory
154+
of the Python build tree, a sibling of \file{Include} and
155+
\file{PC}). Select Win32 as the platform (in my version, this is
156+
the only choice). Make sure the Create new workspace radio button
157+
is selected. Click OK.
158+
159+
You should now create the file \file{spam.def} as instructed in
160+
the previous section. Add the source files to the project, using
161+
\menuselection{Project \sub Add Existing Item}. Set the pattern to
162+
\code{*.*} and select both \file{spam.c} and \file{spam.def} and
163+
click OK. (Inserting them one by one is fine too.)
164+
165+
Now open the \menuselection{Project \sub spam properties} dialog.
166+
You only need to change a few settings. Make sure \guilable{All
167+
Configurations} is selected from the \guilable{Settings for:}
168+
dropdown list. Select the C/\Cpp{} tab. Choose the General
169+
category in the popup menu at the top. Type the following text in
170+
the entry box labeled \guilabel{Additional Include Directories}:
164171

165172
\begin{verbatim}
166173
..\Include,..\PC
167174
\end{verbatim}
168175

169-
Then, choose the Input category in the Link tab, and enter
176+
Then, choose the General category in the Linker tab, and enter
170177

171178
\begin{verbatim}
172179
..\PCbuild
173180
\end{verbatim}
174181

175-
in the text box labelled \guilabel{Additional library path}.
182+
in the text box labelled \guilabel{Additional library Directories}.
176183

177184
Now you need to add some mode-specific settings:
178185

179-
Select \guilabel{Win32 Release} in the \guilabel{Settings for}
186+
Select \guilabel{Release} in the \guilabel{Configuration}
180187
dropdown list. Choose the \guilabel{Link} tab, choose the
181-
\guilabel{Input Category}, and append \code{pythonXY.lib} to the
182-
list in the \guilabel{Object/library modules} box.
183-
184-
Select \guilabel{Win32 Debug} in the \guilabel{Settings for}
185-
dropdown list, and append \code{pythonXY_d.lib} to the list in the
186-
\guilabel{Object/library modules} box. Then click the C/\Cpp{}
187-
tab, select \guilabel{Code Generation} from the
188-
\guilabel{Category} dropdown list, and select \guilabel{Debug
189-
Multithreaded DLL} from the \guilabel{Use run-time library} dropdown
190-
list.
191-
192-
Select \guilabel{Win32 Release} again from the \guilabel{Settings
193-
for} dropdown list. Select \guilabel{Multithreaded DLL} from the
194-
\guilabel{Use run-time library:} dropdown list.
195-
196-
You should now create the file \file{spam.def} as instructed in the
197-
previous section. Then chose the \menuselection{Insert \sub Files
198-
into Project} dialog. Set the pattern to \code{*.*} and select
199-
both \file{spam.c} and \file{spam.def} and click OK. (Inserting
200-
them one by one is fine too.)
188+
\guilabel{Input} category, and append \code{pythonXY.lib} to the
189+
list in the \guilabel{Additional Dependencies} box.
190+
191+
Select \guilabel{Debug} in the \guilabel{Configuration} dropdown
192+
list, and append \code{pythonXY_d.lib} to the list in the
193+
\guilabel{Additional Dependencies} box. Then click the C/\Cpp{}
194+
tab, select \guilabel{Code Generation}, and select
195+
\guilabel{Multi-threaded Debug DLL} from the \guilabel{Runtime
196+
library} dropdown list.
197+
198+
Select \guilabel{Release} again from the \guilabel{Configuration}
199+
dropdown list. Select \guilabel{Multi-threaded DLL} from the
200+
\guilabel{Runtime library} dropdown list.
201201
\end{enumerate}
202202

203203

0 commit comments

Comments
 (0)