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

Home » Public Forums » archive » calling c from idl
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 c from idl [message #4008] Thu, 20 April 1995 00:00 Go to next message
ijg9766 is currently offline  ijg9766
Messages: 1
Registered: April 1995
Junior Member
I am working on a machine vision system for a class project.
We have created a user interface with an IDL widget, and would like to call a child processes written in C, which will control a stepper motor when the appropriate action button is activated. We want to call the child processes and immediatelyt return to IDL without waiting for the child process to finish.

Does anyone know how this can be done using Windows?

Thank you
ian
Re: calling c from idl [message #4098 is a reply to message #4008] Mon, 24 April 1995 00:00 Go to previous messageGo to next message
Emmanuel GUYOT is currently offline  Emmanuel GUYOT
Messages: 2
Registered: April 1995
Junior Member
ijg9766@vaxb.isc.rit.edu wrote:
>
> I am working on a machine vision system for a class project.
> We have created a user interface with an IDL widget, and would like to call a child processes written in C, which will control a stepper motor when the appropriate action button is activated. We want to call the child processes and immediatelyt return to IDL without waiting for the child process to finish.
>
> Does anyone know how this can be done using Windows?
>
> Thank you
> ian
To call a C program from a IDL one, you can use the CALL_EXTERNAL
function for IDL, and put your C program into a DLL.
In your DLL, you can spawn another process...

E.G.
Re: calling c from idl [message #4130 is a reply to message #4008] Mon, 01 May 1995 00:00 Go to previous messageGo to next message
pellet is currently offline  pellet
Messages: 12
Registered: October 1994
Junior Member
Emmanuel GUYOT (emmguyot@cnrs-orleans.fr) wrote:
: ijg9766@vaxb.isc.rit.edu wrote:
: >
: > I am working on a machine vision system for a class project.
: > We have created a user interface with an IDL widget, and would like to call a child processes written in C, which will control a stepper motor when the appropriate action button is activated. We want to call the child processes and immediatelyt return to IDL without waiting for the child process to finish.
: >
: > Does anyone know how this can be done using Windows?
: >
: > Thank you
: > ian
: To call a C program from a IDL one, you can use the CALL_EXTERNAL
: function for IDL, and put your C program into a DLL.
: In your DLL, you can spawn another process...

: E.G.

You could also spawn your C program in the background
with something like: SPAWN, 'c_program &'
This can also be used to make a link to your external
and make an I/O connection between IDL and the C program.

Jeff
Re: Calling C from IDL [message #10088 is a reply to message #4008] Thu, 23 October 1997 00:00 Go to previous messageGo to next message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Tron Darvann wrote:
>
> Dear IDL-users,
>
> We have a C++ program (SGI IRIX) that we wish to call from IDL
> in order to provide 1) a user interface by use of IDL widgets, and
> 2) visualization capabilities.
>
> The C++ program, as it is used today, needs input from the user at
> several levels during execution. I wish to be able to give this input
> to the C++ program FROM IDL.

Tron -

I would suggest getting RSI's "Advanced Development Guide", and also
"Linking Other Software with IDL". This sounds like a problem that
might be solvable by using either Remote Procedure Calls or
Callable IDL. Both have examples, though they are always the
simplest cases.

Dave

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
Re: calling C from IDL [message #43039 is a reply to message #4008] Wed, 09 March 2005 10:07 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Sascha,
It sounds to me the at you did not export the symbol "probiere" so that it
is not accessible to IDL. Read about .def files.

Haje


"Sascha Gossen" <s.gossen@gmx.de> wrote in message
news:f12db891.0503090610.17090054@posting.google.com...
> Hello!
>
> I have a problem in IDL. I try to call a C-Prog in IDL. I use IDL6.0
> under win2000. I will call the C-Prog with the IDL function
> "call_external". I write 2 short test-programms to see the handling of
> the function.
>
> my C-Prog "probiere.c":
>
> #include <stdio.h>
> #include <stdlib.h>
> int probiere( void ){
> int i, j;
> j = 4711;
> printf("Hello World\n");
> i = getchar();
> return j;
> }
>
> I compile this file with the Borland c++ compiler to create a
> 'probiere.dll'.
> I do this like: "bcc32 -WD probiere.c"
>
> my IDL-Prog "c_call_from_idl.pro"
>
> pro c_call_from_idl
> print, 'vor c aufruf'
> result =
> call_external('C:\sgossen\idl\igor\c-prog\probiere.dll','pro biere')
> print, 'nach c aufruf'
> print, 'result: ', result
> help, result
> end
>
> Executing this file I get following error-message:
>
> % CALL_EXTERNAL: Error loading sharable executable.
> Symbol: probiere, File =
> C:\sgossen\idl\igor\c-prog\probiere.dll
> ERROR_PROC_NOT_FOUND
>
> I don't really know where the error could be. The path of the
> .dll-file is still correct.
> Can you help me with my problem?
> Thank you!
> Sascha Gossen
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: calling C from IDL
Next Topic: array referencing problem ...

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

Current Time: Wed Oct 08 15:37:46 PDT 2025

Total time taken to generate the page: 0.00595 seconds