C++: executing other programs
Mo McKinlay
mmckinlay@labs.interopen.org
Sun Mar 12 11:31:00 GMT 2000
# Hi,
#
# is there any possibility to execute other programs from within my C++-program ?
# (I use the g++-compiler for Windows)
#
# Thanks and bye, Knorze
If you're using the cygwin-hosted compiler, you can use the spawn...()
variants - check out the cygwin documentation. Alternatively, you can use
the Win32 API and call WinExec() or ShellExecute() (See the Microsoft SDKs
on the MSDN website - http://msdn.microsoft.com ). If you want your code to
be portable, you could use fork() and the exec...() functions, but
this impairs performance on Win32, due to the lack of a native fork()
equivalent.
Note also that this list is for reporting bugs in the gcc family, not
asking for help with programming.
Regards,
--
Mo McKinlay T: +44 (0) 709 22 55 05 x1
Chief Software Architect F: +44 (0) 709 22 55 05 x3
inter/open E: mmckinlay@labs.interopen.org
A division of Bekon Marketing Limited W: http://www.interopen.org
More information about the Gcc-bugs
mailing list