[SciPy-user] weave, including headers in generated file

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Feb 26 22:36:21 CST 2004


>>>>> "MW" == Magne Westlie <magnew at math.uio.no> writes:

    MW> I've got a class Hello declared in a file hw.h, but how do I
    MW> tell weave to include this file in the generated cpp-file? If
    MW> I try:

    MW> code = """ Hello h; h.hw(); """

    MW> weave.inline(code,
    MW>              [], compiler='gcc', verbose=2, force=1,
    MW>              sources=['/home/mw/weave/inline-ex/hw.cpp'],
    MW>              include_dirs=['/home/mw/weave/inline-ex/'], )

Use the headers keyword and put hw.h into it.  Also add the path to
your header in include_dirs.

cheers,
prabhu



More information about the SciPy-user mailing list