I'm using mingw64 inside cygwin.
I noticed that, in contrast to the cygwin-native gcc, the call to
opens the windows cmd.exe instead of sh.exe. So I have to call e.g.
system("sh.exe -c 'make --help'")
However, this makes it difficult if the command to be executed by sh.exe itself includes single quotation marks.
Is there any way to change this behavior and directly call sh.exe?
Try setting COMSPEC?
I think you should really be using CreateProcess instead. See <http://msdn.microsoft.com/en-us/library/ms682425%28VS.85%29.aspx> for more info.
Thank you for your answer.
As the call to system is inside a library, I don't want to replace every single call to
However, changing the COMSPEC variable make the program call
sh.exe /c ...
sh.exe -c ...
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.