[C++-sig] Installing Boost VC9.0Express and Python 2.5.2 - import PYD complains about python26.dll!!??

Bob Cumming shetlandbob at hotmail.com
Tue Sep 29 23:43:08 CEST 2009


Hello,

 

I'm new to this list and have been trying to install boost to workk with C++ code in python.

 

I downloaded the boost 1.39 windows installer and that worked ok.

I followed the tutorials I found online at boost and the python wiki.

All seemed to go ok.

 

In directory: C:\boost\boost_1_39\libs\python\example\tutorial

 

command bjam --preserve-test-target

 

However I tried to run the hello example, at first I got the erros about the boost_python-vc90-mt-1_39.dll files so I copied them to the output directory, so I cd to the directory, then launch python and try to import the pyd file.  I get the error (message box)

 

"The application has failed to start because python26.dll was not found. Re-installing the applicaiton may fix this problem"

 

Recall I have python 2.5.2 installed!?

 

I tried re-running the bjam command and I get this:

...patience...
...found 1279 targets...
...updating 2 targets...
capture-output bin\hello.test\msvc-9.0express\debug\threading-multi\hello
====== BEGIN OUTPUT ======
Traceback (most recent call last):
  File "hello.py", line 6, in <module>
    import hello_ext
ImportError: DLL load failed: The specified module could not be found.

EXIT STATUS: 1
====== END OUTPUT ======

    set Path=C:\Python25;C:\Python25\libs;C:\boost\boost_1_39\bin.v2\libs\python\build\msvc-9.0express\debug\threading-multi;C:\boost\boost_1_39\libs\python\example\tutorial\bin\msvc-9.0express\debug\threading-multi;%Path%

    set PYTHONPATH=bin\msvc-9.0express\debug\threading-multi
 "C://Python25\python" "hello.py"   > "bin\hello.test\msvc-9.0express\debug\threading-multi\hello.output" 2>&1
    set status=%ERRORLEVEL%
    echo. >> "bin\hello.test\msvc-9.0express\debug\threading-multi\hello.output"
    echo EXIT STATUS: %status% >> "bin\hello.test\msvc-9.0express\debug\threading-multi\hello.output"
    if %status% EQU 0 (
        copy "bin\hello.test\msvc-9.0express\debug\threading-multi\hello.output" "bin\hello.test\msvc-9.0express\debug\threading-multi\hello"
    )
    set verbose=0
    if %status% NEQ 0 (
        set verbose=1
    )
    if %verbose% EQU 1 (
        echo ====== BEGIN OUTPUT ======
        type "bin\hello.test\msvc-9.0express\debug\threading-multi\hello.output"
        echo ====== END OUTPUT ======
    )
    exit %status%

...failed capture-output bin\hello.test\msvc-9.0express\debug\threading-multi\hello...
...failed updating 1 target...
...skipped 1 target...

C:\boost\boost_1_39\libs\python\example\tutorial>bjam --preserve-test-target
...patience...
...found 1279 targets...
...updating 2 targets...
capture-output bin\hello.test\msvc-9.0express\debug\threading-multi\hello
====== BEGIN OUTPUT ======
Traceback (most recent call last):
  File "hello.py", line 6, in <module>
    import hello_ext
ImportError: DLL load failed: The specified module could not be found.

EXIT STATUS: 1
====== END OUTPUT ======

    set Path=C:\Python25;C:\Python25\libs;C:\boost\boost_1_39\bin.v2\libs\python\build\msvc-9.0express\debug\threading-multi;C:\boost\boost_1_39\libs\python\example\tutorial\bin\msvc-9.0express\debug\threading-multi;%Path%

    set PYTHONPATH=bin\msvc-9.0express\debug\threading-multi
 "C://Python25\python" "hello.py"   > "bin\hello.test\msvc-9.0express\debug\threading-multi\hello.output" 2>&1
    set status=%ERRORLEVEL%
    echo. >> "bin\hello.test\msvc-9.0express\debug\threading-multi\hello.output"
    echo EXIT STATUS: %status% >> "bin\hello.test\msvc-9.0express\debug\threading-multi\hello.output"
    if %status% EQU 0 (
        copy "bin\hello.test\msvc-9.0express\debug\threading-multi\hello.output" "bin\hello.test\msvc-9.0express\debug\threading-multi\hello"
    )
    set verbose=0
    if %status% NEQ 0 (
        set verbose=1
    )
    if %verbose% EQU 1 (
        echo ====== BEGIN OUTPUT ======
        type "bin\hello.test\msvc-9.0express\debug\threading-multi\hello.output"
        echo ====== END OUTPUT ======
    )
    exit %status%

...failed capture-output bin\hello.test\msvc-9.0express\debug\threading-multi\hello...
...failed updating 1 target...

 

JAMROOT:

# Copyright David Abrahams 2006. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

# Specify the path to the Boost project.  If you move this project,
# adjust this path to refer to the Boost root directory.
use-project boost
  : C:/boost/boost_1_39 ;

# Set up the project-wide requirements that everything uses the
# boost_python library from the project whose global ID is
# /boost/python.
project
  : requirements <library>/boost/python//boost_python ;

# Declare the three extension modules.  You can specify multiple
# source files after the colon separated by spaces.
python-extension hello_ext : hello.cpp ;

# A little "rule" (function) to clean up the syntax of declaring tests
# of these extension modules.
local rule run-test ( test-name : sources + )
{
    import testing ;
    testing.make-test run-pyd : $(sources) : : $(test-name) ;
}

# Declare test targets
run-test hello : hello_ext hello.py ;


user-config

#  MSVC configuration
using msvc : 9.0express ;

#  Python configuration
using python : 2.5 : C://Python25 ;


 

 

Sorry if this is a very long message, but thought more info should help the understanding.  I have done this on two PC's, and got the same results.... 

 

Can anyone suggest any ideas on how to get this to work?

 

Thanks for reading and any advice greatefully recieved.

 

Cheers

 

 

 

 

 

 

 
 		 	   		  
_________________________________________________________________
Get the best of MSN on your mobile
http://clk.atdmt.com/UKM/go/147991039/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20090929/b3c538a1/attachment-0001.htm>


More information about the Cplusplus-sig mailing list