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

Home » Public Forums » archive » CALL_EXTERNAL Problems with IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
CALL_EXTERNAL Problems with IDL [message #40305] Tue, 03 August 2004 13:01 Go to previous message
MajorSetback is currently offline  MajorSetback
Messages: 9
Registered: August 2004
Junior Member
I am using IDL Version 6.0 (linux x86 m32) on Red Hat Linux release 9.

I have been trying to get CALL_EXTERNAL to do *something* for me so I
wrote some very simple code, Generic.c, which follows. I also define
the functions in Generic.h.
------------------------------------------------------------ -------------
#include <stdio.h>
#include <stdlib.h>
#include "Generic.h"

int Simple()
{
return 16;
}

int PowerOf2()
{
int output;
output=32;
return output;
}
------------------------------------------------------------ -------------
I then compile this code with
> gcc -c Generic.c -o Generic.o
and confirm that the functions are there thus.
> nm Generic.o
0000000a T PowerOf2
00000000 T Simple

This is what I now get on IDL.
IDL> print,call_external('/home/me/Generic.o','Simple',/i_value)
% CALL_EXTERNAL: Error loading sharable executable.
Symbol: Simple, File = /home/me/Generic.o
/usr/local/rsi/idl_6.0/bin/bin.linux.x86/libidl.so.6.0:
undefined symbol: Simple

IDL> print,call_external('/home/me/Generic.o','PowerOf2',/i_value )
0
IDL> print,call_external('/home/me/Generic.o','PowerOf2',/i_value )
-7

OK. So how is Simple undefined?
And how does it get 0 and then 7 from 32?

Many thanks in advance for any help,
Peter.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL on Windows vs. Unix, debugging consideration
Next Topic: Reading MATLAB (*.mat) files

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

Current Time: Sat Oct 11 20:23:39 PDT 2025

Total time taken to generate the page: 0.63759 seconds