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

Home » Public Forums » archive » Re: IDL calling C
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
Re: IDL calling C [message #32780] Mon, 11 November 2002 02:30
Ralf Flicker is currently offline  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
Re: IDL calling C [message #32781 is a reply to message #32780] Sun, 10 November 2002 14:11 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
You may want to check out Stein Vidar's routines to automagically write
your .dlm wrappers for you. It is for F77 but he says you can write F77
dummy functions for your C code.

http://www.astro.uio.no/~steinhh/idl/dlmform.html

-Rick



"Nidhi Kalra" <nrk5@cornell.edu> wrote in message
news:6c4c9ef3.0211071158.2eea6820@posting.google.com...
> 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!
>
> Nidhi
Re: IDL calling C [message #32813 is a reply to message #32781] Thu, 07 November 2002 12:09 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nidhi Kalra (nrk5@cornell.edu) writes:

> 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!

Calling C from IDL, by Ronn Kling. Available here:

http://www.dfanning.com/documents/books.html

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: 4D data analysis
Next Topic: Labels on upper x-axis

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

Current Time: Thu Oct 09 07:06:44 PDT 2025

Total time taken to generate the page: 1.35838 seconds