Re: call_external question [message #11243] |
Wed, 18 March 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Ebeth Jones (Elizabeth.Jones@lmco.com) writes:
> I have a bunch of IDL code that was written to run under SUN OS
> and I'm trying to get it to run under Win95. I noticed that
> there is a call_external in my stuff. I'm still relatively
> new to IDL and hopefully this isn't a really stoopid question,
> but my understanding is that call_external calls compiled object
> code. My question is, can i use the .o file that was compiled
> under unix, or do i need to recompile it on the PC, and if I
> do does IDL have a preferred C compiler for this task?
Oh, if it were only that easy!
Call_External does call code that is written in other
programming languages (often C or Fortran, but other
languages as well). Your shared object library code will
certainly have to be recompiled on the PC, but that's only
the start of it.
On the PC, the "shared" library code must be in the form
of a DLL, using the Win32 protocol. This means that you
are going to have to learn (probably) how to be a least
a little bit of a Windows programmer. You can find some
simple examples of a DLL program in the IDL Advanced
Development Guide and in the external subdirectory of
the IDL distribution, but your best bet is to find someone
who knows what they are doing and offer to buy him or
her lunch several times a week. :-)
There are a number of good Windows programmers frequenting
this newsgroup, but I am certainly NOT one of them.
Personally, I would lean on Peter Mason or Mark Rivers,
especially this time of night. Those two guys have
written *everything*. :-)
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|