[C++-sig] Problems Getting Started in Boost.Python

Scott A. Smith ssmith at magnet.fsu.edu
Fri May 31 15:44:15 CEST 2002


Hello,

I obtained the latest Boost from CVS and gave it a go.
The build of Boost.Python worked just fine on my PC
using both CygWin/GCC and MSVC++. Wow! At least I can
handle that much now. Now I am trying to follow along
what is written in libs\python\doc\example1.html, but
having some problems that one of you can probably rectify
quite easily.

In the directory libs\python\example I again ran (b)jam
and this produced a bin directory that, in the MSVC++ case,
contained in a buried sub-directory many getting_started1
files. Among them are an NT command script, an exp file,
a lib file, and a pyd file (no dll file though). In the
Cygwin case another subdirectory in bin is produced and
it contains only getting_started1.dll, getting_started1.lib,
and getting+started1.obj.

Now to use what I've built in Python.

In the Cygwin case I moved the dll and lib file into libs\python\example and
in that same directory started Python (from Cygwin). Here
is what happens next:

$ python
Python 2.2 (#1, Dec 31 2001, 15:21:18)
[GCC 2.95.3-5 (cygwin special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import getting_started1
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: dlopen: Win32 error 126
>>>

Apparently it sees the dll just fine but either there is something wrong
with it
or I need to import something more?

In the MSVC++ case, I copied everything I thought might actually be read
by Python (there was no dll produced, maybe the pyd file is what is used?)
into my Python/DLLs directory. Upon running Python (Windows) this happens:

Python 2.2.1 (#34, Apr  9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
>>> import getting_started1
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in ?
    import getting_started1
ImportError: DLL load failed: The specified module could not be found.
>>>

Well, that build did not produce a dll so it either failed or Python is
needing something else in this case.

Can someone please explain what form of stupidity I am plagued with now?
Should all of this be working?

Thanks,
Scott








More information about the Cplusplus-sig mailing list