[SciPy-user] (no subject)

Chuckles McGregor chuckles at llnl.gov
Fri Apr 21 10:30:27 CDT 2006


good day,
         I've been trying to get weave working, I'm on a win2k box running 
python 2.4.3, with mingw g++ ver 3.4.2, scipy 0.4.8, numpy 0.9.6 and I 
can't get this example (and some of the others) from the doc to work. the 
error is: `Py' has not been declared
what did I miss in installing/configuring this? I got hello world to work ok.
chuckles


 >>> a=1
 >>> a = weave.inline("return_val = Py::new_reference_to(Py::Int(a+1));",['a'])
<weave: compiling>
No module named msvccompiler in numpy.distutils, trying from distutils..
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid 
for Ada/C/ObjC but not for C++
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp:1: 
warning: ignoring #pragma warning
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp:2: 
warning: ignoring #pragma warning
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp: 
In function `PyObject* file_to_py(FILE*, char*, char*)':
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp:399: 
warning: unused variable 'py_obj'
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp: 
In function `PyObject* compiled_func(PyObject*, PyObject*)':
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp:658: 
error: `Py' has not been declared
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp:658: 
error: `Py' has not been declared
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp:658: 
error: `Int' undeclared (first use this function)
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp:658: 
error: (Each undeclared identifier is reported only once for each function 
it appears in.)
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp:658: 
error: `new_reference_to' undeclared (first use this function)

Traceback (most recent call last):
   File "<pyshell#5>", line 1, in -toplevel-
     a = weave.inline("return_val = Py::new_reference_to(Py::Int(a+1));",['a'])
   File "C:\Python24\Lib\site-packages\scipy\weave\inline_tools.py", line 
334, in inline
     auto_downcast = auto_downcast,
   File "C:\Python24\Lib\site-packages\scipy\weave\inline_tools.py", line 
442, in compile_function
     verbose=verbose, **kw)
   File "C:\Python24\Lib\site-packages\scipy\weave\ext_tools.py", line 353, 
in compile
     verbose = verbose, **kw)
   File "C:\Python24\Lib\site-packages\scipy\weave\build_tools.py", line 
274, in build_extension
     setup(name = module_name, ext_modules = [ext],verbose=verb)
   File "C:\Python24\Lib\site-packages\numpy\distutils\core.py", line 85, 
in setup
     return old_setup(**new_attr)
   File "C:\Python24\lib\distutils\core.py", line 166, in setup
     raise SystemExit, "error: " + str(msg)
CompileError: error: Command "g++ -O2 -Wall -Wstrict-prototypes 
-IC:\Python24\lib\site-packages\scipy\weave 
-IC:\Python24\lib\site-packages\scipy\weave\scxx 
-IC:\Python24\lib\site-packages\numpy\core\include -IC:\Python24\include 
-IC:\Python24\PC -c 
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.cpp 
-o 
c:\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_intermediate\compiler_d41d8cd98f00b204e9800998ecf8427e\Release\docume~1\mcgreg~1\locals~1\temp\mcgregor1\python24_compiled\sc_5b09eaf68ff529a1fbaedc892ca5a4530.o" 
failed with exit status 1
 >>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.scipy.net/pipermail/scipy-user/attachments/20060421/d785738c/attachment.htm


More information about the SciPy-user mailing list