Bill Harris wrote:
> I'm trying to execute an external program compiled under cygwin from J.
>
> I tried forms such as
>
> wd'winexec "c:\cygwin\home\Bill Harris\myprogram.exe c:\cygwin\howe\Bill
> Harris\mydata.txt" sw_shownormal'
>
> That flashes a new window on the screen temporarily and returns a 0, and
...
> Is there a way to accomplish what I'm trying to do?
Is cygwin's bin directory in your path?
Here's a quick test I did, from a cygwin shell (hand copied
because that machine is not networked, but hopefully I've
not introduced any horrible mistakes). ($ represents the
cygwin prompt, ^D represents control-D.)
$ cd /tmp
$ cat >abcd.c
#include <stdio.h>
main(){printf("Hello\n");
getchar();}
^D
$ make abcd
$ ./abcd
Hello
$ c:/j601/j
Now I have a cygwin program that displays something
and waits for me to hit Enter before it exits. And,
I have a J session with cygwin's bin directory in its
path. In that session I type:
wd 'winexec c:\cygwin\tmp\abcd.exe'
This pops up a new window, which displays some text and
is waiting for me to hit enter. Meanwhile, wd has returned 0.
If I mis-spell the executable name, wd would instead give me
a domain error.
Seems to work for me...
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm