Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8cd70c35
Commit
8cd70c35
authored
May 14, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instructions updated for 1.5. Added the important note to set the
run-library to multithreaded dll.
parent
201afe56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
21 deletions
+24
-21
PC/example_nt/readme.txt
PC/example_nt/readme.txt
+24
-21
No files found.
PC/example_nt/readme.txt
View file @
8cd70c35
*** WARNING -- THIS DIRECTORY IS OUT OF DATE.
*** It has not been updated since Python 1.4beta3.
Example Python extension for Windows NT
Example Python extension for Windows NT
=======================================
=======================================
This directory contains everything you need to build a Python
This directory contains everything you need to build a Python
extension module using Microsoft VC++ 4.x ("Developer Studio"), except
extension module using Microsoft VC++ 4.x ("Developer Studio"), except
for the Python distribution. It has
only been tested with version
for the Python distribution. It has
been tested most recently with
4.0, but should work with higher versions
.
version 4.2
.
The "example
" subdirectory should be an immediate subdirectory of the
The "example
_nt" subdirectory should be an immediate subdirectory of
Python source directory -- a direct sibling of Include and PC, in
the
Python source directory -- a direct sibling of Include and PC, in
particular, which are referenced as "..\Include" and "..\PC".
particular, which are referenced as "..\Include" and "..\PC".
In
In other words, it should *not* be used "as is". Copy or move it up
other words, it should *not* be used "as is". Copy or move it up one
one
level or you will regret it! (This is done to keep all the PC
level or you will regret it! (This is done to keep all the PC
specific files inside the PC subdirectory of the distribution, where
specific files inside the PC subdirectory of the distribution, where
they belong.)
they belong.)
It is also assumed that the build results of Python are in the
It is also assumed that the build results of Python are in the
directory ..\vc40. In particular, the python1
4
.lib file is referred
directory ..\vc40. In particular, the python1
5
.lib file is referred
to as "..\vc40\python1
4
.lib".
to as "..\vc40\python1
5
.lib".
In order to use the example project from Developer Studio, use the
In order to use the example project from Developer Studio, use the
"File->Open Workspace..." dialog (*not* the "File->Open..." dialog!).
"File->Open Workspace..." dialog (*not* the "File->Open..." dialog!).
...
@@ -63,7 +59,7 @@ Python interface).
...
@@ -63,7 +59,7 @@ Python interface).
Now your options are:
Now your options are:
1) Clone example.mak. Start by copying example\example.mak to
1) Clone example.mak. Start by copying example
_nt
\example.mak to
spam\spam.mak. Do a global edit on spam.mak, replacing all
spam\spam.mak. Do a global edit on spam.mak, replacing all
occurrences of the string "example" by "spam", and all occurrences of
occurrences of the string "example" by "spam", and all occurrences of
"DEP_CPP_EXAMP" by something like "DEP_CPP_SPAM". You can now use
"DEP_CPP_EXAMP" by something like "DEP_CPP_SPAM". You can now use
...
@@ -72,9 +68,9 @@ this makefile to create a project file by opening it as a workspace
...
@@ -72,9 +68,9 @@ this makefile to create a project file by opening it as a workspace
2) Create a brand new project; instructions are below.
2) Create a brand new project; instructions are below.
In both cases, copy example\example.def to spam\spam.def, and edit
In both cases, copy example
_nt
\example.def to spam\spam.def, and edit
spam\spam.def so its second line contains the string "initspam".
spam\spam.def so its second line contains the string "initspam".
If
If
you created a new project yourself, add the file spam.def to the
you created a new project yourself, add the file spam.def to the
project now.
project now.
You are now all set to build your extension, unless it requires other
You are now all set to build your extension, unless it requires other
...
@@ -97,17 +93,24 @@ Win32 as the platform (in my version, this is the only choice). Click
...
@@ -97,17 +93,24 @@ Win32 as the platform (in my version, this is the only choice). Click
Now open the "Build->Settings..." dialog. (Impressive, isn't it? :-)
Now open the "Build->Settings..." dialog. (Impressive, isn't it? :-)
You only need to change a few settings. Make sure you have both the
You only need to change a few settings. Make sure you have both the
Debug and the Release configuration selected when you make the
se
Debug and the Release configuration selected when you make the
first
change
s
. Select the "C/C++" tab. Choose the "Preprocessor" category
change. Select the "C/C++" tab. Choose the "Preprocessor" category
in the popup menu at the top. Type the following text in the entry
in the popup menu at the top. Type the following text in the entry
box labeled "Addditional include directories:"
box labeled "Addditional include directories:"
..\Include,..\PC
..\Include,..\PC
You must also change the run-time library. This must be done
separately for the Release and Debug configurations. Choose the "Code
Generation" category in the C/C++ tab. In the box labeled "Use
run-time library", choose "Multithreaded DLL" for the Release
configuration, and "Debug Multithreaded DLL" for the Debug
configuration. That's all.
You should now first create the file spam.def as instructed in the
You should now first create the file spam.def as instructed in the
previous section.
previous section.
Now chose the "Insert->Files into Project..." dialog. Set the pattern
Now chose the "Insert->Files into Project..." dialog. Set the pattern
to *.* and select both spam.c and spam.def and click OK. (Inserting
to *.* and select both spam.c and spam.def and click OK. (Inserting
them one by one is fine too.) Using the same dialog, choose the file
them one by one is fine too.) Using the same dialog, choose the file
..\vc40\python1
4
.lib and insert it into the project.
..\vc40\python1
5
.lib and insert it into the project.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment