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

Home » Public Forums » archive » Call_External and Re-Compiling C programs
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 and Re-Compiling C programs [message #12546] Thu, 20 August 1998 00:00 Go to previous message
rmlongfield is currently offline  rmlongfield
Messages: 68
Registered: August 1998
Member
Hi Everyone,
I've had some suucess using CALL_EXTERNAL to input IDL data to
a C program and recieve a result.

My problem is, when I use SPAWN to compile a C program, the
executable is not redefined within IDL. When I edit the C program and wish to
recompile, it doesn't work. I have to exit IDL to get rid of it.

-----------------------------

The IDL program is as follows:

PRO test
sh_command = 'testfile.sh'
c_command = 'testp'
SPAWN,sh_command
x=23
y=33
result = CALL_EXTERNAL('testp.so','testp',x,y)
print,'Result passed to IDL: ',result
help,/routines
end


++++++The shell program testfile.sh is:

rm *.o
rm *.so
echo Object files removed
cc -c -KPIC testp.c
ld -shared -o testp.so testp.o -lm
echo Finished compiling
# produces testp.o and testp.so

+++++++The output for all of this is:

IDL> test
Object files removed
Finished compiling
*__________________________________________
*____Value of argc: 2
*____Value of argv: 23
*____Value of argv: 33
*___________________________________________
Result passed to IDL: 56
Compiled Procedures:
$MAIN$
TEST

Compiled Functions:


Question: Does anyone know how to un-define the compiled procedures?

Thanks
Rose Dlh... (dlhopols@DELETE_THISknmi.nl)



-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
[Message index]
 
Read Message
Read Message
Previous Topic: Colors Common Block?
Next Topic: Path info in *.sav file

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

Current Time: Fri Oct 10 08:27:08 PDT 2025

Total time taken to generate the page: 0.95875 seconds