[SciPy-user] Problem with Weave

Bob.Cowdery at CGI-Europe.com Bob.Cowdery at CGI-Europe.com
Fri Jul 9 07:44:50 CDT 2004


I am about to convert some python code to 'C' so am going through the Weave
documentation. I can get most things to work except returning values from
the 'C' code. I would guess the correct libraries are not getting into the
compile but I don't know how to fix it. I can compile and run any 'C' code
fine until I use any of the Py:: classes.
 
As an example if I type:
 
>>> import weave 
>>> a=1
>>> a=weave.inline("return_val = Py::new_reference_to(Py::Int(a+1));",['a'],
verbose=2)
 
this gives me:
 
file changed
running build_ext
building 'sc_5b09eaf68ff529a1fbaedc892ca5a4531' extension
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo
/Ox /MD /W3 /GX -IC:\Python22\lib\site-packages\weave
-IC:\Python22\lib\site-packages\weave\scxx -IC:\Python22\include
/TpC:\DOCUME~1\cowderyb\LOCALS~1\Temp\CowderyB\python22_compiled\sc_5b09eaf6
8ff529a1fbaedc892ca5a4531.cpp
/FoC:\DOCUME~1\cowderyb\LOCALS~1\Temp\CowderyB\python22_intermediate\compile
r_ba943cc959c75c0df25fd4c114ec382f\Release\sc_5b09eaf68ff529a1fbaedc892ca5a4
531.obj
Traceback (most recent call last):
  File "<input>", line 1, in ?
  File "C:\Python22\lib\site-packages\weave\inline_tools.py", line 335, in
inline
    auto_downcast = auto_downcast,
  File "C:\Python22\lib\site-packages\weave\inline_tools.py", line 439, in
compile_function
    verbose=verbose, **kw)
  File "C:\Python22\lib\site-packages\weave\ext_tools.py", line 340, in
compile
    verbose = verbose, **kw)
  File "C:\Python22\lib\site-packages\weave\build_tools.py", line 272, in
build_extension
    setup(name = module_name, ext_modules = [ext],verbose=verb)
  File "C:\Python22\lib\site-packages\scipy_distutils\core.py", line 42, in
setup
    return old_setup(**new_attr)
  File "C:\Python22\lib\distutils\core.py", line 157, in setup
    raise SystemExit, "error: " + str(msg)
CompileError: error: command '"C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\bin\cl.exe"' failed with exit status 2
 
Any help appreciated.
 
Thanks
Bob
 
 
Bob Cowdery
CGI Senior Technical Architect
+44(0)1438 791517
Mobile: +44(0)7771 532138
bob.cowdery at cgi-europe.com <mailto:bob.cowdery at cgi-europe.com> 
 
 
 

*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else.  In such case, you should destroy this
message and are asked to notify the sender by reply email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.scipy.net/pipermail/scipy-user/attachments/20040709/777f359a/attachment.htm


More information about the SciPy-user mailing list