Chas recommended, it's a good idea to always
include the following at the beginning of your Inline::C scripts:
use Inline C => Config =>
BUILD_NOISY => 1;
Then (and only then) will you get to see helpful output (that Inline,
by default, conceals) as a script *successfully* buil
On Thu, May 29, 2008 at 12:53 PM, Rajnikant
<[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I have a static library main.a and I want to call one function of this
> library from Perl code.
> I have configured Inline params link (LIBS,INC etc) and my perl script
> compiles fine.
>
> But when I call
Hello everyone,
I have a static library main.a and I want to call one function of this
library from Perl code.
I have configured Inline params link (LIBS,INC etc) and my perl script
compiles fine.
But when I call library function from perl script, it says 'Undefined
subroutine func_name'.
Do yo
Steven Schubiger wrote:
> On 26 Mar, Edward Wijaya wrote:
>
>>What could be the problem?
>>Is there a way to solve it
>
> I assume, the typedef doesn't value the "hooked" malloc, thus,
> I recommend:
>
> long double *big_double;
> big_double = (long double *) malloc(2*sizeof(long double));
On 26 Mar, Edward Wijaya wrote:
> What could be the problem?
> Is there a way to solve it
I assume, the typedef doesn't value the "hooked" malloc, thus,
I recommend:
long double *big_double;
big_double = (long double *) malloc(2*sizeof(long double));
--
The trouble with having an open mind, of
Dear Steven,
Sorry, don't mean to nitpick.
On Sat, 26 Mar 2005 23:09:26 +0800, Steven Schubiger
<[EMAIL PROTECTED]> wrote:
On 26 Mar, Edward Wijaya wrote:
It's fine, as it is. Typedefs most often reside in header files,
although, they can be used in the main file without suffer.
As per your sug
On 26 Mar, Edward Wijaya wrote:
> Sorry my C is barely Novice.
> Where can I put this snippet in my C subroutine?
It's fine, as it is. Typedefs most often reside in header files,
although, they can be used in the main file without suffer.
If you ever should get bored, read the Perl Sources.
--
On Sat, 26 Mar 2005 22:31:52 +0800, Steven Schubiger
<[EMAIL PROTECTED]> wrote:
typedef (malloc(2*sizeof(long double))) Big_Double;
Big_Double var;
Sorry my C is barely Novice.
Where can I put this snippet in my C subroutine?
like this:
[snip code]
__END__
__C__
typedef (malloc(2*sizeof(long do
On 26 Mar, Edward Wijaya wrote:
>> printf("%i\n", sizeof(long double));
>
> It gives:
> 12
Fine, it was even 2 Bytes bigger than excepted.
typedef (malloc(2*sizeof(long double))) Big_Double;
Big_Double var;
var should measure 24 bytes in size, which should suffice;
if not, increment the factor
> On 26 Mar, Edward Wijaya wrote:
>> Try "long double" instead, which gives you 10 Bytes and
>> the format char %Lf.
> Still wont' do. It still return 'inf' for N>500
Another solution would be, dynamically allocating memory:
long double var;
var = (long double *) malloc(2*sizeof(long double)
On 26 Mar, Edward Wijaya wrote:
>> Try "long double" instead, which gives you 10 Bytes and
>> the format char %Lf.
> Still wont' do. It still return 'inf' for N>500
What does printf("%i\n", sizeof(long double)); tell you?
The byte sizes of variable types can vary from platform to platform.
--
Hi Steven,
On Sat, 26 Mar 2005 22:08:44 +0800, Steven Schubiger
<[EMAIL PROTECTED]> wrote:
Try "long double" instead, which gives you 10 Bytes and
the format char %Lf.
Still wont' do. It still return 'inf' for N>500
--
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addi
On 26 Mar, Edward Wijaya wrote:
>> Change every occurence of the word "float" , in your script,
>> to "double".
>
> It worked, but still limited. It overflowed when N>500.
> Most of the value of N, I use are around 1000-2000.
>
> Any other possibility?
Try "long double" instead, which gives you
Hi Zentara,
Thanks for the reply.
On Sat, 26 Mar 2005 21:35:17 +0800, zentara <[EMAIL PROTECTED]> wrote:
Change every occurence of the word "float" , in your script,
to "double".
It worked, but still limited. It overflowed when N>500.
Most of the value of N, I use are around 1000-2000.
Any other p
Hi,
I have the following code that uses Inline::C to compute factorial.
The problem is that whenever I use large N (>30) it began to return "INF".
I thougtht my C implementation already cater large number by using "float"?
Additionally I have already added Math::Pari as
On Wed, 2002-07-17 at 19:02, drieux wrote:
>
> On Wednesday, July 17, 2002, at 03:21 , Chas Owens wrote:
> [..]
> > however Inline::C is not always available,
> [..]
>
> http://search.cpan.org/search?dist=Inline
>
> yes from the Readme it notes:
>
>
On Wednesday, July 17, 2002, at 03:21 , Chas Owens wrote:
[..]
> however Inline::C is not always available,
[..]
http://search.cpan.org/search?dist=Inline
yes from the Readme it notes:
"Inline saves you from the hassle of having to write and compile your own
glue code using fa
Okay, this is not exactly a beginner's question, but I can't seem to find an answer to
this
anywhere.
Does anyone have any samples of XS, SWIG, or Inline::C code (preferably the latter)
that accesses
scratchpad variables? I've looked and can't seem to find any. Readi
18 matches
Mail list logo