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

Home » Public Forums » archive » IDL call_external and code distributed across several .so libraries
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
IDL call_external and code distributed across several .so libraries [message #45698] Sun, 02 October 2005 16:28 Go to previous message
Denis Barkats is currently offline  Denis Barkats
Messages: 4
Registered: October 2005
Junior Member
Hi, I am running IDL on a mac os X (10.3) and I was happy to have
gotten the "call_external" function to work under IDL using the simple
exemple described in Fanning's pages
(http://www.dfanning.com/tips/calling_c.html). But I'd like to use
call_external with pieces of codes distributed accross several
libraries. Here is my exemple: I have two C codes, generic.c and
utils.c( see below) and generic.c calls a function in utils.c.

generic.c:

int PowerOf2()
{
int output;
output=someFunction();
return output;
}

utils.c:

int someFunction()
{
return 32;
}

Here is how I compile them

gcc -c utils.c
gcc -c generic.c
ld generic.o -bundle -o generic.so
ld utils.o -bundle -o utils.so ( I get the following error here ld:
Undefined symbols: _someFunction )

Now how do I modify call_external to call PowerOf2, since it now
depends on code in both generic.so and
utils.so?

IDL>

print,call_external('/Users/denis/idl/bicep/generic.so','Pow erOf2',/i_value)


Thank you

Denis
[Message index]
 
Read Message
Read Message
Previous Topic: MODIS bowtie correction
Next Topic: Displaying Multidimensal Data

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

Current Time: Sat Oct 11 10:32:55 PDT 2025

Total time taken to generate the page: 0.72281 seconds