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

Home » Public Forums » archive » simple CALL_EXTERNAL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
simple CALL_EXTERNAL [message #53777] Mon, 30 April 2007 14:19
skymaxwell@gmail.com is currently offline  skymaxwell@gmail.com
Messages: 127
Registered: January 2007
Senior Member
how call c - function from IDL for Windows

for example example.cpp

double bmean(float *array,int n)
{
double total=0.0;
int i;
for (i=0;i<n;i++) total+=(*array++);
return (total/(double)n);
}

now i build example.dll

now from idl

idl> arr=randomu(s,1000000)*10000.0
idl>mean=call_external("D:\WORK\idl\example\Debug
\example.dll","bmean",arr, n_elements(arr),/d_value)


i've got error - not found procedure

CALL_EXTERNAL: Error loading sharable executable.
Symbol: bmean, File = D:\WORK\idl\example\Debug
\example.dll

also i try with
idl>mean=call_external("D:\WORK\idl\example\Debug\example.dll ","?
bmean@@YANPAMH@Z",arr, n_elements(arr),/d_value)

the same error
i was try on both VC7.0 and VC6.0

thanks
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Trouble finding procedure files
Next Topic: IDL-WAVELETS-JPEG200

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

Current Time: Wed Oct 08 17:44:07 PDT 2025

Total time taken to generate the page: 0.00550 seconds