import scipy.weave
from scipy.weave import converters
#scipy.weave.test()
def a(): #weave for integration
code=\
"""
return 1.0f;
"""
return scipy.weave.inline(code,[],
type_converters=converters.blitz,
compiler = 'gcc')
a()
----
Found executable C:\MinGW\bin\g++.exe
c:\users\guga\appdata\local\temp\Guga\python26_compiled\sc_a0b6eca574faa460c40cd
c2b7cba09531.cpp: In function `PyObject* compiled_func(PyObject*, PyObject*)':
c:\users\guga\appdata\local\temp\Guga\python26_compiled\sc_a0b6eca574faa460c40cd
c2b7cba09531.cpp:669: error: cannot convert `float' to `PyObject*' in return
Traceback (most recent call last):
File "weave_example.py", line 16, in <module>
a()
File "weave_example.py", line 14, in a
compiler = 'gcc')
File "C:\Python26\lib\site-packages\scipy\weave\inline_tools.py", line 355, in
inline
**kw)
File "C:\Python26\lib\site-packages\scipy\weave\inline_tools.py", line 482, in
compile_function
verbose=verbose, **kw)
File "C:\Python26\lib\site-packages\scipy\weave\ext_tools.py", line 367, in co
mpile
verbose = verbose, **kw)
File "C:\Python26\lib\site-packages\scipy\weave\build_tools.py", line 273, in
build_extension
setup(name = module_name, ext_modules = [ext],verbose=verb)
File "C:\Python26\lib\site-packages\numpy\distutils\core.py", line 186, in set
up
return old_setup(**new_attr)
File "C:\Python26\lib\distutils\core.py", line 169, in setup
raise SystemExit, "error: " + str(msg)
distutils.errors.CompileError: error: Command "g++ -mno-cygwin -O2 -Wall -IC:\Py
thon26\lib\site-packages\scipy\weave -IC:\Python26\lib\site-packages\scipy\weave
\scxx -IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -
IC:\Python26\PC -c c:\users\guga\appdata\local\temp\Guga\python26_compiled\sc_a0
b6eca574faa460c40cdc2b7cba09531.cpp -o c:\users\guga\appdata\local\temp\Guga\pyt
hon26_intermediate\compiler_08edc7e348e1c33f63a33ab500aef08e\Release\users\guga\
appdata\local\temp\guga\python26_compiled\sc_a0b6eca574faa460c40cdc2b7cba09531.o
" failed with exit status 1