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

Home » Public Forums » archive » Re: Compiling shared libraries for use with call_external on a Mac
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: Compiling shared libraries for use with call_external on a Mac [message #19701] Wed, 12 April 2000 00:00
arkos is currently offline  arkos
Messages: 11
Registered: July 1998
Junior Member
An addition to what I asked below:

I can add a "dummy" main() to the C file, and produce something
which appears to be a shared library. However, when I try to
use call_external from the IDL side, I get the error:

% CALL_EXTERNAL: Error loading sharable executable.
Symbol: testing_external, File =
Documents:Arkos:SMS:PLOT:test_external_libs
symbol was not found
% Execution halted at: TEST_CALL_EXTERNAL 18
Documents:Arkos:SMS:PLOT:test_call_external.pro
% $MAIN$

I don't know if I am doing something wrong on the C side in
creating the shared library, or on the IDL side in the
implementation, so any suggestions would be appreciated.

Thanks again,

-- Greg


For those interested, the code consists of:

** C**

#include <stdio.h>

int testing_external(int argc, char *argv[]);

int testing_external(int argc, char *argv[])
{
printf("Test.\n");
return(1);
}

void main(void)
{
}

** IDL **

PRO test_call_external

MESSAGE, ' begins!', /INFORMATIONAL

a = call_external("test_external_libs","testing_external", /i_value)

MESSAGE, ' complete!', /INFORMATIONAL

RETURN
END

> A question for those out there who have used call_external in IDL with
> (hopefully) C subroutines on the Macintosh.
>
> I have an older version of Metrowerks Codewarrior (IDE 1.6.3, CW 9),
> and have set the Project type to shared library, in the preferences
> for the project. However, it doesn't seem to want to compile and
> produce the shared library (it keeps looking for main(), while
> the C file I'm compiling only contains a collection of subroutines).

--
Gregory G. Arkos Institute for Space Research
arkos@NOSPAMphys.ucalgary.ca Department of Physics and Astronomy
Voice : +1 403 220 6958 The University of Calgary
FAX : +1 403 282 5016 Calgary, Alberta, CANADA T2N 1N4
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Dissect SAVE files, and more!
Next Topic: Re: unexpected EOF?

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

Current Time: Fri Oct 10 04:30:12 PDT 2025

Total time taken to generate the page: 0.71813 seconds