Subject: Re: g++: Problem with system()
From: [email-masked] (Michael Hirmke)
To: [email-masked]
Date: 17 Mar 2000 21:02:00 +0200

Hi Martin,

>Hello,
>
>I have a program that calls programs with system(). It also prints out
>what it wants to execute. Compiled with linux gcc everything works fine.
>But the executable compiled with cygwin has a problem: It only works
>when executed in the windows bash. Executed in a DOS-Box it only writes
>what he wants to exec but doesn't do anything even if I only call
>something simple like "echo ...". In Windows 95 this "doing nothing"

echo is a builtin command of command.com on Win9x and cmd.exe on
NT4/W2K, so you can't just call it with the system command.
In a bash window the situation is different - even though echo is a
shell builtin, the calling bash can run it. Besides that, there is an
external program named echo.exe, too.
If you want to test your program use something like "notepad", which can
be found through $PATH on all WinXX systems.

>even takes a lot of time but in Windows 98 and NT4 it is very quick.
>
>thank you for help
>
>Martin Trautmann

Bye.
Michael.
-- 
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:[email-masked]
                         | WWW     http://aquarius.franken.de/

--
Want to unsubscribe from this list?
Send a message to [email-masked]