This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC 2.95-Mingw32: winsock.h is not C++ enabled


Marcel Cox <marcel.cox@ibm.net> writes:
> The winsock.h file from the mingw32 version of GCC 2.95 is not C++ 
> enabled. You get link time errors because the names for the winsock 
> functions are mangled. The solution is to include the usual C11 enabling 
> stuff in the header file, e.g.
> 
> near the beginning of the file:
> 
> #ifdef __cplusplus
> extern "C" {
> #endif /* __cplusplus */
> 
> near the end:
> 
> #ifdef __cplusplus
> }
> #endif /* __cplusplus */

Thanks.

I used Anders' last snapshot (+ a few local changes), and it's indeed
missing the C linkage spec needed for C++ code. It looks it's fixed
in Cygwin winsup snapshots, and in retrospect, I should've spent some
time merging those changes in.

I'm assuming Anders will put out a new release in due time, and that
will fix these little problems.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]