You shouldn't include the glibc headers directly, but use the patched mingw
headers, as described on the LibGw32C page. Also, compile with -D__GW32__
Kees Zeelenberg
----- Oorspronkelijk bericht -----
Van: "Marc Chantreux" <khatar@...>
Aan: "gnuwin32" <gnuwin32-users@...>
Verzonden: woensdag 24 maart 2004 14:36
Onderwerp: [GnuWin32-Users] compile with LibGW32C ?
> Hi all,
>
> I'm trying to write a program using sleep() function (i don't know about
> windows API) using LibGW32C. I've added the LibGW32C files in my mingw
> root and using amol's native zsh port to launch gcc :
>
> C:/src/c>gcc -I /opt/MinGW/include/glibc/ -Wall -o sl.exe main.c
>
> In file included from /opt/MinGW/include/glibc/sys/select.h:46,
> from /opt/MinGW/include/glibc/sys/types.h:216,
> from /opt/MinGW/include/glibc/stdlib.h:414,
> from c:/opt/MinGW/include/objbase.h:12,
> from c:/opt/MinGW/include/ole2.h:9,
> from c:/opt/MinGW/include/windows.h:111,
> from main.c:1:
> /opt/MinGW/include/glibc/bits/time.h:68: redefinition of `struct
> timeval'
> In file included from /opt/MinGW/include/glibc/sys/types.h:216,
> from /opt/MinGW/include/glibc/stdlib.h:414,
> from c:/opt/MinGW/include/objbase.h:12,
> from c:/opt/MinGW/include/ole2.h:9,
> from c:/opt/MinGW/include/windows.h:111,
> from main.c:1:
> /opt/MinGW/include/glibc/sys/select.h:78: conflicting types for `fd_set'
> c:/opt/MinGW/include/winsock2.h:56: previous declaration of `fd_set'
> /opt/MinGW/include/glibc/sys/select.h:109: conflicting types for
> `select'
> c:/opt/MinGW/include/winsock2.h:565: previous declaration of `select'
> In file included from main.c:3:
> /opt/MinGW/include/glibc/unistd.h:752: conflicting types for
> `gethostname'
> c:/opt/MinGW/include/winsock2.h:568: previous declaration of
> `gethostname'
>
> i understand that the problem is a conflict between LibGW32C's and
> minGW's declarations but i don't know how to fix the problem.
>
> Any idea ?
>
> Regards,
> Marc Chantreux
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> GnuWin32-Users mailing list
> GnuWin32-Users@...
> https://lists.sourceforge.net/lists/listinfo/gnuwin32-users
>
>
|