mirror of
https://github.com/python/cpython.git
synced 2025-09-03 15:31:08 +00:00
Update the example DLL instructions for 2.1. Add example.def to the
MSVC project file (as the instructions always recommended doing).
This commit is contained in:
parent
cc58363611
commit
a2bf2709b3
2 changed files with 16 additions and 11 deletions
|
@ -53,7 +53,7 @@ BSC32=bscmake.exe
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python20.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"..\PCbuild" /export:initexample
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python21.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"..\PCbuild" /export:initexample
|
||||||
# SUBTRACT LINK32 /pdb:none
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "example - Win32 Debug"
|
!ELSEIF "$(CFG)" == "example - Win32 Debug"
|
||||||
|
@ -80,7 +80,7 @@ BSC32=bscmake.exe
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python20_d.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:".\Debug/example_d.dll" /libpath:"..\PCbuild" /export:initexample
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib python21_d.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:".\Debug/example_d.dll" /libpath:"..\PCbuild" /export:initexample
|
||||||
# SUBTRACT LINK32 /pdb:none
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
@ -98,6 +98,10 @@ SOURCE=.\example.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\example.def
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\readme.txt
|
SOURCE=.\readme.txt
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
|
|
|
@ -4,7 +4,7 @@ Example Python extension for Windows NT
|
||||||
This directory contains everything needed (except for the Python
|
This directory contains everything needed (except for the Python
|
||||||
distribution!) to build a Python extension module using Microsoft VC++
|
distribution!) to build a Python extension module using Microsoft VC++
|
||||||
("Developer Studio") version 6. It has been tested with VC++ 6.0 on Python
|
("Developer Studio") version 6. It has been tested with VC++ 6.0 on Python
|
||||||
2.0b1. You can also use earlier versions of VC to build Python extensions,
|
2.1a1. You can also use earlier versions of VC to build Python extensions,
|
||||||
but the sample VC project file (example.dsw in this directory) is in VC 6
|
but the sample VC project file (example.dsw in this directory) is in VC 6
|
||||||
format.
|
format.
|
||||||
|
|
||||||
|
@ -22,7 +22,9 @@ OPEN THE PROJECT
|
||||||
From VC 6.x, use the
|
From VC 6.x, use the
|
||||||
File -> Open Workspace...
|
File -> Open Workspace...
|
||||||
dialog (*not* the "File -> Open..." dialog!). Navigate to and select the
|
dialog (*not* the "File -> Open..." dialog!). Navigate to and select the
|
||||||
file "example.dsw". Click Open.
|
file "example.dsw", in the *copy* of the example_nt directory you made
|
||||||
|
above.
|
||||||
|
Click Open.
|
||||||
|
|
||||||
BUILD THE EXAMPLE DLL
|
BUILD THE EXAMPLE DLL
|
||||||
---------------------
|
---------------------
|
||||||
|
@ -52,14 +54,14 @@ debug output from Python may not match this screen dump exactly):
|
||||||
C>..\..\PCbuild\python_d
|
C>..\..\PCbuild\python_d
|
||||||
Adding parser accelerators ...
|
Adding parser accelerators ...
|
||||||
Done.
|
Done.
|
||||||
Python 2.0b1 (#0, Jul 1 2000, 11:29:37) [MSC 32 bit (Intel)] on win32
|
2.1a1 (#9, Jan 17 2001, 23:26:42) [MSC 32 bit (Intel)] on win32
|
||||||
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
|
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
|
||||||
Copyright 1995-2000 Corporation for National Research Initiatives (CNRI)
|
Copyright 1995-2000 Corporation for National Research Initiatives (CNRI)
|
||||||
>>> import example
|
>>> import example
|
||||||
[8830 refs]
|
[4897 refs]
|
||||||
>>> example.foo()
|
>>> example.foo()
|
||||||
Hello, world
|
Hello, world
|
||||||
[8830 refs]
|
[4903 refs]
|
||||||
>>>
|
>>>
|
||||||
|
|
||||||
TESTING THE RELEASE-MODE DLL
|
TESTING THE RELEASE-MODE DLL
|
||||||
|
@ -69,9 +71,8 @@ example_nt\Release. You should now be able to repeat the following session
|
||||||
("C>" is the DOS prompt, ">>>" is the Python prompt):
|
("C>" is the DOS prompt, ">>>" is the Python prompt):
|
||||||
|
|
||||||
C>..\..\PCbuild\python
|
C>..\..\PCbuild\python
|
||||||
Python 2.0b1 (#0, Jul 1 2000, 11:28:35) [MSC 32 bit (Intel)] on win32
|
Python 2.1a1 (#9, Jan 17 2001, 23:26:37) [MSC 32 bit (Intel)] on win32
|
||||||
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
|
Type "copyright", "credits" or "license" for more information.
|
||||||
Copyright 1995-2000 Corporation for National Research Initiatives (CNRI)
|
|
||||||
>>> import example
|
>>> import example
|
||||||
>>> example.foo()
|
>>> example.foo()
|
||||||
Hello, world
|
Hello, world
|
||||||
|
@ -123,7 +124,7 @@ Use the
|
||||||
dialog to create a new Project Workspace. Select "Win32 Dynamic-Link
|
dialog to create a new Project Workspace. Select "Win32 Dynamic-Link
|
||||||
Library", enter the name ("spam"), and make sure the "Location" is set to
|
Library", enter the name ("spam"), and make sure the "Location" is set to
|
||||||
the spam directory you have created (which should be a direct subdirectory
|
the spam directory you have created (which should be a direct subdirectory
|
||||||
of the Python build tree, a sibling of Inclue and PC). Select Win32 as the
|
of the Python build tree, a sibling of Include and PC). Select Win32 as the
|
||||||
platform (in my version, this is the only choice). Make sure the "Create
|
platform (in my version, this is the only choice). Make sure the "Create
|
||||||
new workspace" radio button is selected. Click OK.
|
new workspace" radio button is selected. Click OK.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue