Question about using MinGW GCC on Cygwin

陳韋任 (Wei-Ren Chen)
Tue Dec 9 03:20:00 GMT 2014

Hi All,

  I am trying to build gdbserver [1] on cygwin with mingw-gcc, since
I want to build native windows executable and cygwin-gcc doesn't
support "-mno-cygwin" any more. Here is how I do the config,

$ cd gdb-7.8.1/gdb/gdbserver
$ CC=i686-pc-mingw32-gcc ./configure

After `make`, I get the error message below,

i686-pc-mingw32-gcc -g -O2    -I. -I. -I./../common -I./../regformats -I./.. -I./../../include -I./../gnulib/import
-Ibuild-gnulib-gdbserver/import -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Wempty-body
-DGDBSERVER -c -o remote-utils.o -MT remote-utils.o -MMD -MP -MF .deps/remote-utils.Tpo remote-utils.c
remote-utils.c: In function 'handle_accept_event':
remote-utils.c:161:22: error: storage size of 'sockaddr' isn't known

It seems that mingw-gcc fails to find struct sockaddr due to the
incorrect include search path. What am I missing here, or should
I fall back to use MingGW instead?

Thanks. :-) 



Wei-Ren Chen (陳韋任)

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list