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

Home » Public Forums » archive » Re: simple 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: simple CALL_EXTERNAL [message #53773 is a reply to message #53772] Tue, 01 May 2007 04:52 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
have you tried this under linux? If it works there, my guess is you forgot
to export the symbol bmean. Haje


<skymaxwell@gmail.com> wrote in message
news:1177967940.895398.317470@u30g2000hsc.googlegroups.com.. .
> 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
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Antarctic Temperature Data
Next Topic: Re: Compiling a DLL?

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

Current Time: Sun Nov 30 08:25:16 PST 2025

Total time taken to generate the page: 0.00906 seconds