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

Home » Public Forums » archive » Re: CALL_EXTERNAL error when calling a C program
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: CALL_EXTERNAL error when calling a C program [message #45840] Tue, 11 October 2005 16:22
dmg31 is currently offline  dmg31
Messages: 3
Registered: October 2005
Junior Member
thank you for your reply,

I tried your suggestions, along with a few other options and I was
able to compile and create the sharable library with the line

ld simul2.o -flat_namespace -bundle -undefined suppress -o simul.so

however when I ran the idl code again I got a new error saying:

Symbol not found: dyld_stub_binding_helper
Expected in: flat namespace

im not sure the best soultion to this
thank you so much for your help again
Re: CALL_EXTERNAL error when calling a C program [message #45858 is a reply to message #45840] Mon, 10 October 2005 17:46 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Sun, 09 Oct 2005 11:27:40 -0700, golembeski wrote:

> Hey,
>
> I am running on mac os x. I have an IDL program which calls a C
> program, and this worked when I ran the program on a SUN but now I have
> just moved my files onto a new mac. I have been reading many of the
> responses to similar questions on this board but I have had no success
> in solving these errors.
>
> When I compile the c code using:
>
> gcc -c simul2.c
> ld simul2.o -bundle -lm -o simul.so
>
> i get the error:
>
> ld: Undefined symbol:
> dyld_stub_blinding_helper
>
> I am not sure how to solve that problem.

Your code (simul2.c) somehow needs the dynamic loader.

Try including libdl.dylib (add -ldl)

or maybe add the -dynamic option.

anyway, dyld_stub_binding_helper is defined in libdl.
I assume that you just made a typo above - "blinding".
Re: CALL_EXTERNAL error when calling a C program [message #45867 is a reply to message #45858] Mon, 10 October 2005 13:02 Go to previous message
Denis Barkats is currently offline  Denis Barkats
Messages: 4
Registered: October 2005
Junior Member
Here is what I do and it works on my mac.
i have a file simple.c:

#include <stdio.h>
#include <stdlib.h>

int Simple() {
return 13;
}

Using gcc I do
-gcc -c simple.c
-gcc -bundle -flat_namespace -o simple.so simple.o
which creates the sharable librairie simple.so which I can call from
IDL as
-print,call_external('/Users/denis/idl/bicep/simple.so','Sim ple',
/unload)
13


sometimes IDL is a pain so restart it.
good luck
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Asynchronous reading
Next Topic: group leader for iTools

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

Current Time: Wed Oct 08 17:01:12 PDT 2025

Total time taken to generate the page: 0.00504 seconds