[C++-sig] import getting_started1 - "no module named getting_started1" when using python_d
happybrowndog
happybrowndog at hotmail.com
Thu Aug 7 09:32:00 CEST 2008
I used bjam to create the pyd files in the example, all created fine.
When I use python to import getting_started1, there's no problem. But
when I use python_d to do the same thing, I get a "ImportError: no
module named getting_started1 [29800 refs]" error.
I am using VC++ 9.0, and have built python.exe and python_d.exe from
source, as well as python25.dll and python25_d.dll. It is also my bjam
tool set.
The reason I am interested in running it with python_d.exe is because I
would like to be able to debug the extension with VC++ .... but I may be
under the wrong assumption that using python_d.exe is a necessity for
debugging. Is this true?
Here is my jamfile:
******************
use-project boost
: ../../.. ;
project
: requirements <library>/boost/python//boost_python ;
python-extension getting_started1 : getting_started1.cpp :
<threading>multi : <variant>debug : <python-debugging>on ;
python-extension getting_started2 : getting_started2.cpp :
<threading>multi : <variant>debug : <python-debugging>on ;
python-extension std_pair_ext : std_pair.cpp : <threading>multi :
<variant>debug : <python-debugging>on ;
Here is my bjam command:
********************
c:\boost-jam-3.1.16\bin.ntx86\bjam --preserve-test-targets
--debug-configuration
Here is my user-config.jam file:
********************
using msvc : : "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/cl";
using python : 2.5 : C:/Python25 ;
The following is the output of bjam with -o log.txt:
***********************
call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo
@"bin\msvc-9.0\debug\threading-multi\getting_started1.obj.rsp"
call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 >nul
link /NOLOGO /INCREMENTAL:NO /DLL /DEBUG /subsystem:console
/out:"bin\msvc-9.0\debug\threading-multi\getting_started1.pyd"
/IMPLIB:"bin\msvc-9.0\debug\threading-multi\getting_started1.lib"
/LIBPATH:"C:\Python25\libs"
@"bin\msvc-9.0\debug\threading-multi\getting_started1.pyd.rsp"
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
if exist
"bin\msvc-9.0\debug\threading-multi\getting_started1.pyd.manifest" (
mt -nologo -manifest
"bin\msvc-9.0\debug\threading-multi\getting_started1.pyd.manifest"
"-outputresource:bin\msvc-9.0\debug\threading-multi\getting_started1.pyd;2"
)
call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo
@"bin\msvc-9.0\debug\threading-multi\getting_started2.obj.rsp"
call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 >nul
link /NOLOGO /INCREMENTAL:NO /DLL /DEBUG /subsystem:console
/out:"bin\msvc-9.0\debug\threading-multi\getting_started2.pyd"
/IMPLIB:"bin\msvc-9.0\debug\threading-multi\getting_started2.lib"
/LIBPATH:"C:\Python25\libs"
@"bin\msvc-9.0\debug\threading-multi\getting_started2.pyd.rsp"
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
if exist
"bin\msvc-9.0\debug\threading-multi\getting_started2.pyd.manifest" (
mt -nologo -manifest
"bin\msvc-9.0\debug\threading-multi\getting_started2.pyd.manifest"
"-outputresource:bin\msvc-9.0\debug\threading-multi\getting_started2.pyd;2"
)
call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"bin\msvc-9.0\debug\threading-multi\std_pair.obj.rsp"
call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 >nul
link /NOLOGO /INCREMENTAL:NO /DLL /DEBUG /subsystem:console
/out:"bin\msvc-9.0\debug\threading-multi\std_pair_ext.pyd"
/IMPLIB:"bin\msvc-9.0\debug\threading-multi\std_pair_ext.lib"
/LIBPATH:"C:\Python25\libs"
@"bin\msvc-9.0\debug\threading-multi\std_pair_ext.pyd.rsp"
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
if exist
"bin\msvc-9.0\debug\threading-multi\std_pair_ext.pyd.manifest" (
mt -nologo -manifest
"bin\msvc-9.0\debug\threading-multi\std_pair_ext.pyd.manifest"
"-outputresource:bin\msvc-9.0\debug\threading-multi\std_pair_ext.pyd;2"
)
More information about the Cplusplus-sig
mailing list