Web lists-archives.com

Re: [Mingw-users] Getting error message in a file

> Date: Sun, 27 Dec 2015 21:09:16 +0100
> From: Vincent Lesbros <lesbros@xxxxxxxxx>
> I know, I have to get the stderr output,
> But the interface, from Smalltalk to run a Windows command is through the
> ShellExecute method :
> some thing like :
> <C: unsigned int ShellExecuteW(
> HWND hwnd,
> LPCWSTR lpOperation,
> LPCWSTR lpFile,
> LPCWSTR lpParameters,
> LPCWSTR lpDirectory,
> int nShowCmd )>
> For the lpOperation I use "open"
> For the lpFile the path to the MinGW gcc compiler, (a NTFSFilename('c:\Program
> Files (x86)\CodeBlocks\MinGW\bin\g++.exe'))
> in lpParameters, I put the file to compile or link, 
> I can't see any way to get the stderr output ?
> Is there an option to tell the compiler to send errors in a specified file in
> the command line ?

No, not AFAIK.  But you can write a batch file in which you invoke GCC
with stderr redirected via "2> FILE", and then invoke that batch file
via ShellExecuteW.

MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe