[SciPy-user] weave, including headers in generated file
Magne Westlie
magnew at math.uio.no
Thu Feb 26 09:12:20 EST 2004
Hello.
I'm having a problem with using weave which I was wondering if someone
could help me out with.
I've got a class Hello declared in a file hw.h, but how do I tell weave to
include this file in the generated cpp-file? If I try:
code = """
Hello h;
h.hw();
"""
weave.inline(code,
[],
compiler='gcc',
verbose=2,
force=1,
sources=['/home/mw/weave/inline-ex/hw.cpp'],
include_dirs=['/home/mw/weave/inline-ex/'],
)
Compiling fails because Hello is not defined:
/home/mw/.python23_compiled/sc_dbdc99b5e1f621cd206ee575625e18f15.cpp:644:
error: `
Hello' undeclared (first use this function)
If I open the cpp file manually and puts:
#include <hw.h>
in it, everything works.
Magne Westlie
More information about the SciPy-User
mailing list