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

Home » Public Forums » archive » Re: The CALL_EXTERNAL function
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: The CALL_EXTERNAL function [message #6295] Tue, 21 May 1996 00:00
dave is currently offline  dave
Messages: 31
Registered: February 1994
Member
>>>> > "Scott" == Scott McIntosh <scott@astro.gla.ac.uk> writes:

Scott> Hi guys/gals, Please can someone help me, I am at my wits'
Scott> end. I am attempting to use call_external function to call
Scott> a 'C' program (eg example.c) , which itself calls F77
Scott> subroutines (eg example1.f). The example routines I am
Scott> quoting are contained in the IDL User/Ref manuals, but
Scott> being able to run these would give me great insight into
Scott> running the routines I desire. The basic problem seems to
Scott> be using the 'ld' command to create the necessary shareable
Scott> library, and is not a compilation problem , I think !!!!!!

Scott> Any help that you can provide would be most
Scott> appreciated.

Scott> Thanks, Scott


Compile with the -KPIC or -Kpic options (-PIC if using GCC), and link
with the -G option:

# module.c uses libm.a and libmy_stuff.a

cc -Kpic -o module.o module.c
ld -G -o module.so -L~/mylibs -lmy_stuff -lm module.o

I use this to call LAPACK fortran routines from a C wrapper. Because
of the huge number of symbols, I have to compile LAPACK with -KPIC.



Good luck,

David.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Outward tickmarks on plots
Next Topic: The CALL_EXTERNAL function

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

Current Time: Wed Oct 08 19:40:48 PDT 2025

Total time taken to generate the page: 0.00468 seconds