comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Multidimensional arrays and CALL_EXTERNAL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Multidimensional arrays and CALL_EXTERNAL [message #60968 is a reply to message #60829] Mon, 23 June 2008 05:15 Go to previous message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
Dan wrote:
> Hi Lajos,
>
> This doesn't seem to be working for me.

Dan,

It works for me; as an example:

multi.c
-------

#include <stdio.h>
#include "idl_export.h"

void do_work(float *a)
{
printf("%f\n",a[3+5*10+7*10*20+9*10*20*30]);
}

IDL_VPTR multi(int argc, IDL_VPTR argv[])
{
do_work((float *) argv[0]);
}

multi.pro
---------

pro multi
a=fltarr(10,20,30,40)

a[3,5,7,9]=3.14

junk=call_external('multi.so','multi',a,/unload)
end

Compile
-------

gcc -I /usr/local/rsi/idl/external/include -shared multi.c -o multi.so

does the above work for you? Can you post an example of code which fails?

Thanks,

Allan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Runtime crashes
Next Topic: Java Bridge Import

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:03:53 PDT 2025

Total time taken to generate the page: 0.00570 seconds