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

Home » Public Forums » archive » Calling IDL from C
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
Calling IDL from C [message #45751] Fri, 07 October 2005 05:40 Go to next message
bujji is currently offline  bujji
Messages: 10
Registered: October 2005
Junior Member
Dear All,

I am trying to call the some IDL routines from C, but any how i do not
get sucess.
I am using red hat Linux 9.0 , and my IDL version is 6.1. I am trying
to run the example calltest.c program that is given in
IDL_6.1/external/callable/calltest.c.
Can any body tell me the exact steps for runing this program on RedHat
Linux.

With Regards
Prahlad Sarma.
Re: Calling IDL from C [message #45809 is a reply to message #45751] Fri, 14 October 2005 07:47 Go to previous messageGo to next message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
raval.chintan@gmail.com wrote:
...
> make IDLDIR=$IDL_DIR calltest
> gcc -I/usr/local/rsi/idl_6.2/external/include -o calltest
> /usr/local/rsi/idl_6.2/external/callable/calltest.c
> -L/usr/local/rsi/idl_6.2/bin/bin.linux.x86 -lidl -Wl,-rpath,.
> -Wl,-rpath
> /usr/local/rsi/idl_6.2/bin/bin.linux.x86 /usr/X11R6/lib/libXm.so.3 -lXp
> -L/usr/X11R6/lib -lXpm -lXext -lXt -lSM -lICE -lX11 -ldl -ltermcap -lrt
> -lm -lpthread
>
> The error issued is :
>
> /usr/bin/ld: cannot find -lXp

The "-lXp" option makes the linker look for a file named libXp.a or
libXp.so in the current list of library search directories. The
"-L/usr/X11R6/lib" option adds the /usr/X11R6/lib directory to the
current list of library search directories. Where is libXp.* on your
system? On my system libXp.so.6 and libXp.so.6.2 are in /usr/X11R6/lib.
If it's the same on your system, then you have to put the "-lXp" option
after the "-L/usr/X11R6/lib" option. Otherwise the linker isn't looking
for it in the right location.
Re: Calling IDL from C [message #45824 is a reply to message #45751] Wed, 12 October 2005 22:31 Go to previous messageGo to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
libidl.so is not in your path. this library contains the references you are
missing.


"bujji" <prahlad.sarma@gmail.com> wrote in message
news:1129009267.625551.179380@f14g2000cwb.googlegroups.com.. .
> [sukesh@isdlinux call_exeternal]$ gcc -o idl.new $BINDIR/main.o
> $LDFLAGS
> /usr/local/rsi/idl_6.1/bin/bin.linux.x86/main.o(.text+0x31a) : In
> function `main':
> : undefined reference to `IDL_Runtime'
> /usr/local/rsi/idl_6.1/bin/bin.linux.x86/main.o(.text+0x33d) : In
> function `main':
> Hai,
> These are the errors i got when i worked with calltest.c program in
> RSI/IDL/external/callable/
>
>
> : undefined reference to `IDL_DEclient'
> /usr/local/rsi/idl_6.1/bin/bin.linux.x86/main.o(.text+0x357) : In
> function `main':
> : undefined reference to `IDL_Main'
> /usr/local/rsi/idl_6.1/bin/bin.linux.x86/main.o(.text+0x379) : In
> function `main':
> : undefined reference to `IDL_Main'
> collect2: ld returned 1 exit status
>
> Regads,
> Prahlad V
>
Re: Calling IDL from C [message #45856 is a reply to message #45751] Mon, 10 October 2005 22:41 Go to previous messageGo to next message
bujji is currently offline  bujji
Messages: 10
Registered: October 2005
Junior Member
[sukesh@isdlinux call_exeternal]$ gcc -o idl.new $BINDIR/main.o
$LDFLAGS
/usr/local/rsi/idl_6.1/bin/bin.linux.x86/main.o(.text+0x31a) : In
function `main':
: undefined reference to `IDL_Runtime'
/usr/local/rsi/idl_6.1/bin/bin.linux.x86/main.o(.text+0x33d) : In
function `main':
Hai,
These are the errors i got when i worked with calltest.c program in
RSI/IDL/external/callable/


: undefined reference to `IDL_DEclient'
/usr/local/rsi/idl_6.1/bin/bin.linux.x86/main.o(.text+0x357) : In
function `main':
: undefined reference to `IDL_Main'
/usr/local/rsi/idl_6.1/bin/bin.linux.x86/main.o(.text+0x379) : In
function `main':
: undefined reference to `IDL_Main'
collect2: ld returned 1 exit status

Regads,
Prahlad V
Re: Calling IDL from C [message #45885 is a reply to message #45751] Mon, 10 October 2005 04:38 Go to previous messageGo to next message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
bujji wrote:
> Haje,
> The error i faced when i compile the C code is as follows
>
> -lxp

That's a very uninformative error message. I strongly suspect that
you're misinterpreting something, and that the actual error message is
a lot longer than the one you've shown. Please provide the following:

a) The actual text of the code that you can't compile. It would help a
lot if you simplify the code as much as it can be simplified, while
still producing the error message. Repeatedly cut out parts of the
code, and re-compile it, to verify that it still produces the error
message. This is primarily for our benefit, but you might also find
that it helps you figure out for yourself where the actual problem is.

b) Attempt to compile the code, and show us all of the text associated
with that compilation attempt. If you're using a command line
interface, issue the command that attempts to compile the code, and
show us all of the text from that command line to the bottom of your
screen.
Re: Calling IDL from C [message #68701 is a reply to message #45751] Tue, 17 November 2009 15:09 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
Alexander Jesser wrote:
> Hello,
> I am not an expert in IDL, but may be somebody can give me answers to
> my questions. Is it possible to generate a DLL (dynamic link library)
> from the IDL code? Further, is it possible to call IDL within C code?
> If yes, how can I do this?

I'm not sure what you mean by "from the IDL code". If you mean can IDL
pro code be compiled into a DLL, the answer is no. But, the MAKE_DLL
routine will compile C code into a DLL.

It is possible to call IDL from within C code. The interface is called
Callable IDL. It is in the "All topics" tab of the online help under IDL
Programmers' Guides > External Development Guide > Part III: Techniques
that use IDL's Internal API > Callable IDL.

--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Calling IDL from C
Next Topic: Re: Wohnwagen Gasschlauch

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

Current Time: Wed Oct 08 13:43:40 PDT 2025

Total time taken to generate the page: 0.00703 seconds