system() without window

Regan Heath regan at
Wed Jul 11 11:08:09 PDT 2007

okibi wrote:
> I tried your method for popen and i get "Symbol undefined" errors. I also tried this code:
> extern (C) {
> 	typedef void FILE;
> 	FILE* popen(char* cmd, char* type);
> 	int pclose(FILE* stream);
> }
> and get the same errors.
> Any ideas?

Ahh, I was mistaken;  popen only works on UNIX.  You need to code up 
something with CreateProcess.  I recall someone else posted a popen 
implementation for windows once..

Maybe that will help.


More information about the Digitalmars-d-learn mailing list