winegcc & stdin

Ruslan Kabatsayev b7.10110111 at
Fri Mar 27 02:21:13 CDT 2015


On Fri, Mar 27, 2015 at 1:54 AM, Leon Bogaert <leonbogaert at> wrote:
> I'm getting an error when using winegcc with stdin:
>> $ cat test.c | winegcc -xc -c -
>> gcc: warning: ‘-x c’ after last input file has no effect
>> gcc: error: -E or -x required when input is from standard input
>> winegcc: gcc failed
> Does anyone know what I could be doing wrong? I'm trying to use stdin
> because that's what the go (cgo) build tool is trying to use.
I think it's not you who does something wrong, it's winegcc which runs
gcc a bit wrongly. If you look at gcc command line arguments, you'll
get something like

-D_WIN64 -D__WIN64 -D__WIN64__ -DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__
-D__WINNT -D__WINNT__ -D__stdcall=__attribute__((ms_abi))
-D__cdecl=__attribute__((ms_abi)) -D_stdcall=__attribute__((ms_abi))
-D_cdecl=__attribute__((ms_abi)) -D__fastcall=__attribute__((ms_abi))
-D_fastcall=__attribute__((ms_abi)) -D__declspec(x)=__declspec_##x
-D__declspec_thread=__thread -D__int8=char -D__int16=short
-D__int32=int -D__int64=long -D__WINE__ -c - -xc

Notice that '-xc' has moved after '-c -'. Maybe this should be
considered a bug of winegcc.

> Leon


More information about the wine-devel mailing list