This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++: executing other programs



# 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]