Re: [fpc-pascal] xterm -e program-compiled-with-fpc2.4.0 doesn't work

2012-02-28 Thread Noah Silva
Hi Max,

I haven't used Shell(), and I am sure others can help you there.  However,
I can think of at least two alternatives:
1. Use pexec() directly
2. Use TProcess or TUTF8Process.

 Thank you,
   Noah Silva

2012/2/28 max m.e...@planet.nl

 With the advent of Debian6 fpc 2.4.0-2 has become the only available
 version.
 Before that, it may have been 1.0 ?
 A simple program of mine compiled in 2008 with the old fpc , when started
 with xterm -e program still runs fine today.
 Now. the new compiler warns about SHELL function being deprecated and
 link.res containing output sections but finishes.
 Though the produced binary runs as expexted when run in an xterm, using the
 method of xterm -e program does not [ this is the method of starting the
 program through the X11 twm-menu, which should come up with a new
 xterm-window] :  I only see a short flicker of an xterm-window then
 disapearing; there's no error message.
 Would anyone have an idea what's wrong?

 --
 View this message in context:
 http://free-pascal-general.1045716.n5.nabble.com/xterm-e-program-compiled-with-fpc2-4-0-doesn-t-work-tp5519778p5519778.html
 Sent from the Free Pascal - General mailing list archive at Nabble.com.
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] xterm -e program-compiled-with-fpc2.4.0 doesn't work

2012-02-27 Thread max
With the advent of Debian6 fpc 2.4.0-2 has become the only available version.
Before that, it may have been 1.0 ?
A simple program of mine compiled in 2008 with the old fpc , when started
with xterm -e program still runs fine today.
Now. the new compiler warns about SHELL function being deprecated and
link.res containing output sections but finishes.
Though the produced binary runs as expexted when run in an xterm, using the
method of xterm -e program does not [ this is the method of starting the
program through the X11 twm-menu, which should come up with a new
xterm-window] :  I only see a short flicker of an xterm-window then
disapearing; there's no error message.
Would anyone have an idea what's wrong?

--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/xterm-e-program-compiled-with-fpc2-4-0-doesn-t-work-tp5519778p5519778.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] xterm -e program-compiled-with-fpc2.4.0 doesn't work

2012-02-27 Thread Mark Morgan Lloyd

max wrote:

With the advent of Debian6 fpc 2.4.0-2 has become the only available version.
Before that, it may have been 1.0 ?
A simple program of mine compiled in 2008 with the old fpc , when started
with xterm -e program still runs fine today.


What are you trying to say: that before 2.4 you were using 1.0?


Now. the new compiler warns about SHELL function being deprecated and
link.res containing output sections but finishes.


Not sure about the first, I believe the second is the usual behaviour 
and can be ignored.



Though the produced binary runs as expexted when run in an xterm, using the
method of xterm -e program does not [ this is the method of starting the
program through the X11 twm-menu, which should come up with a new
xterm-window] :  I only see a short flicker of an xterm-window then
disapearing; there's no error message.
Would anyone have an idea what's wrong?


[Slightly later] I think I can see similar behaviour if running on a 
local system, running over ssh (which is what I first tried) changes things.


Try running xterm from a (local) shell, and look at the output. If it's

No absolute path found for shell: X

then invoke the program with an absolute path (i.e. not relying on the 
PATH shell variable), or if you're in the current directory make sure 
you put ./ in front of it. I don't know why this should depend on the 
version of FPC used.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal