Re: IDL calling C [message #32780] |
Mon, 11 November 2002 02:30  |
Ralf Flicker
Messages: 19 Registered: October 2001
|
Junior Member |
|
|
Nidhi Kalra wrote:
>
> Hi,
>
> I was wondering if anybody could point me to some resources for
> calling C functions from IDL. I have never done this before myself and
> am quite unfamiliar with C. I have somebody else's .h and .c files and
> need to call their functions from IDL, but have little understanding
> of the internals of their stuff. Thanks!
If you have IDL you probably also have the External Development
Guide (or at least have access to), and it might be a good idea
to check this one out before you go and buy some other book. The
CALL_EXTERNAL routine is probably the simplest way to invoke
external codes from within an IDL session, and this is described
in some detail in chapter 7 of this book. There are explicit
examples of how to call C codes using the standard (argc, argv)
calling sequence, and also examples of the IDL wrapper routines.
I've been fiddling with exactly this myself lately, and not
being particularly well versed in C, I find it quite cumbersome
and confusing at the best of times - but the results can be
literally outstanding if your requirement is optimal
performance. Don't hesitate to post your qustions here; I'll
probably not be able to answer, but I too would learn a lot from
the answers. Good luck.
ralf
|
|
|