This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: mingw32, winsock.h and g++ - problem
- To: help-gcc at gnu dot org
- Subject: Re: mingw32, winsock.h and g++ - problem
- From: khan at xraylith dot wisc dot edu (Mumit Khan)
- Date: 31 Aug 1999 17:23:41 GMT
- Newsgroups: gnu.gcc.help
- Organization: Center for X-ray Lithography, UW-Madison
- References: <Pine.GSO.3.96.990831185737.14091O-100000@petunia.ce.chalmers.se>
- Xref: wodc7nx0 gnu.gcc.help:779
In article <Pine.GSO.3.96.990831185737.14091O-100000@petunia.ce.chalmers.se>,
Robert Feldt <feldt@ce.chalmers.se> wrote:
>
>Hi,
>
>I'm trying to compile and link a C++-program using winsock.h with the
>mingw32 headers and libs and gcc 2.95 (assembled by Mumit Khan).
>Compilation is fine but there seems to be a problem with the name mangling
>during linking:
[ Posted and copied to Robert Feldt <feldt@ce.chalmers.se> ]
This is a known problem (sure, now I tell you ;-). Please visit
http://www/~khan/software/gnu-win32/gcc.html#gcc295-fixes
to see others like this.
Some of the w32api include files (all the win*.h files) are missing
the ``extern "C"'' wrapper. ie., you need to wrap winsock.h in the
following wrapper.
#ifdef __cplusplus
extern "C" {
#endif
/* file here. */
#ifdef __cplusplus
}
#endif
Regards,
Mumit