tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] how to set the 'include' path in embeded C script?


From: Rob Landley
Subject: Re: [Tinycc-devel] how to set the 'include' path in embeded C script?
Date: Mon, 26 Feb 2007 17:12:22 -0500
User-agent: KMail/1.9.1

Did you ever get an answer to this question?

Rob

On Wednesday 27 December 2006 8:29 am, oyster wrote:
> Hi, everyone.
> In fact, I use libtcc.so in http://www.cs.tut.fi/~ask/cinpy/, which is
> a Python(www.python.org) library can implement functions with C in
> Python script directly.
> 
> My question is, how to set the 'include' path, so that libtcc.so can
> find it. Thanx
> The following python exits with "ValueError: tcc_relocate returned
> error code -1."
> [code]
> import ctypes
> import cinpy
> fraction=cinpy.defc("fraction",
>                 ctypes.CFUNCTYPE(ctypes.c_float,None),
>                 """
>                 #include "stdlib.h"
>                 #include "stdio.h"
>                 #include "math.h"
> 
>                 float fraction(void)
>                 {
>                       return sin(3.1415926/6); //that will err
>                       //return 1; //but this will be ok
>               }
>               """)
>                               
> print fraction()
> [/code]
> 
> 
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/tinycc-devel
> 
> 

-- 
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery




reply via email to

[Prev in Thread] Current Thread [Next in Thread]